![]() |
Widening Names Dropdown (Bob)
Thanks once again Bob.
I particularly like the Names dropdown widening procedure as this has been a pain in a number of workbooks for a while. However, I tried adding it as a Workbook Open event to my Personal.XLS file and it seems to get upset with the Public Declare parts at the top. Error: "...Declare statements not allowed as Public members of object modules" Does this mean I have to stick this in a class module first (or at least the Declare elements)? Regards John "Bob Phillips" wrote in message ... You can also select the range, and type the name directly into the names box, to the left of the formula bar. You might want to learn a bit more at http://www.xldynamic.com/source/xld.Names.html -- HTH RP |
Widening Names Dropdown (Bob)
John,
Just stick it back into whatever kind of module it was originally in, and call it from the workbook_open event ben "John" wrote: Thanks once again Bob. I particularly like the Names dropdown widening procedure as this has been a pain in a number of workbooks for a while. However, I tried adding it as a Workbook Open event to my Personal.XLS file and it seems to get upset with the Public Declare parts at the top. Error: "...Declare statements not allowed as Public members of object modules" Does this mean I have to stick this in a class module first (or at least the Declare elements)? Regards John "Bob Phillips" wrote in message ... You can also select the range, and type the name directly into the names box, to the left of the formula bar. You might want to learn a bit more at http://www.xldynamic.com/source/xld.Names.html -- HTH RP |
Widening Names Dropdown (Bob)
It means you have to put it in a general module - rather than a sheet or
this workbook module. Try just changing the declarations to Private in your current location. -- Regards, Tom Ogilvy "John" wrote in message ... Thanks once again Bob. I particularly like the Names dropdown widening procedure as this has been a pain in a number of workbooks for a while. However, I tried adding it as a Workbook Open event to my Personal.XLS file and it seems to get upset with the Public Declare parts at the top. Error: "...Declare statements not allowed as Public members of object modules" Does this mean I have to stick this in a class module first (or at least the Declare elements)? Regards John "Bob Phillips" wrote in message ... You can also select the range, and type the name directly into the names box, to the left of the formula bar. You might want to learn a bit more at http://www.xldynamic.com/source/xld.Names.html -- HTH RP |
Widening Names Dropdown (Bob)
Hi John,
Glad you liked it. To answer the question, no, all you need to do is to either add the API declarations to a standard code module, or declare them Private. -- HTH RP (remove nothere from the email address if mailing direct) "John" wrote in message ... Thanks once again Bob. I particularly like the Names dropdown widening procedure as this has been a pain in a number of workbooks for a while. However, I tried adding it as a Workbook Open event to my Personal.XLS file and it seems to get upset with the Public Declare parts at the top. Error: "...Declare statements not allowed as Public members of object modules" Does this mean I have to stick this in a class module first (or at least the Declare elements)? Regards John "Bob Phillips" wrote in message ... You can also select the range, and type the name directly into the names box, to the left of the formula bar. You might want to learn a bit more at http://www.xldynamic.com/source/xld.Names.html -- HTH RP |
Widening Names Dropdown (Bob)
Excellent. Thanks very much Ben, Tom and especially Bob!
Well, I've made the change and it works perfectly, but why can't a Declare statement be made Public? I understand that it may not be good practise but is there any other reason? Thanks again John "Bob Phillips" wrote in message ... Hi John, Glad you liked it. To answer the question, no, all you need to do is to either add the API declarations to a standard code module, or declare them Private. -- HTH RP (remove nothere from the email address if mailing direct) "John" wrote in message ... Thanks once again Bob. I particularly like the Names dropdown widening procedure as this has been a pain in a number of workbooks for a while. However, I tried adding it as a Workbook Open event to my Personal.XLS file and it seems to get upset with the Public Declare parts at the top. Error: "...Declare statements not allowed as Public members of object modules" Does this mean I have to stick this in a class module first (or at least the Declare elements)? Regards John "Bob Phillips" wrote in message ... You can also select the range, and type the name directly into the names box, to the left of the formula bar. You might want to learn a bit more at http://www.xldynamic.com/source/xld.Names.html -- HTH RP |
All times are GMT +1. The time now is 02:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com