Widening Names Dropdown (Bob)

J

John

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
 
G

Guest

John,

Just stick it back into whatever kind of module it was originally in, and
call it from the workbook_open event
ben
 
T

Tom Ogilvy

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.
 
B

Bob Phillips

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)
 
J

John

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top