Object Libraries

  • Thread starter Thread starter Alec Bowman
  • Start date Start date
A

Alec Bowman

I have a macro produced on Excel 2000 which includes the
line

"Set mycontrol = commandbars.findcontrols(tag:= "synchro
elevation")

This causes a "method or data member not found" error on
my machine at home which has Excel 97

Is there anything I can do to resolve this?
 
I believe you have to use the singular version of the command in Excel 97.
"Set mycontrol = commandbars.findcontrol(tag:= "synchro elevation")

Which should work in all versions.
 
Unfortunately it isn't then possible to use

"if mycontrol.count > 0 then ....."

to determine whether the button exists or not as I get a
type mismatch error.

Will have to see what other methods would allow this check
to be made.
 
If mycontrol = nothing the ... gives an invalid use of
object error unfortunately

Regards

Alec
 

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

Back
Top