Link to home
Start Free TrialLog in
Avatar of Tocogroup
TocogroupFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How do I reference an Excel VBA ActiveX control ?

Hi All,

I have an Excel sheet with an ActiveX combo box named coYear. However, when I try to refer to it in my VBA procedure I get the following error message : Compile error. Method or data member not found

I'm trying to load a variable called strFileNameYear from this control object as follows:

strFileNameYear = Me.Controls("coYear").Value

What am I doing wrong ?

Thanks
Toco
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tocogroup

ASKER

Thanks for two helpful solutions, both. I'll split the points if you don't mind.