Widening Names Dropdown (Bob)

  • Thread starter Thread starter John
  • Start date Start date
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
 
John,

Just stick it back into whatever kind of module it was originally in, and
call it from the workbook_open event
ben
 
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.
 
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)
 
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
 
Back
Top