excel vba - Accessing ActiveX control from Module -


i guess have basic wrong here, can please correct me?

i have activex control in "home" worksheet. now, when code,

this works:

msgbox (thisworkbook.worksheets("home").quantity.value) 

so this:

with thisworkbook.worksheets("home")     msgbox (.quantity.value) end 

but not:

dim wh worksheet set wh = thisworkbook.worksheets("home") msgbox (wh.quantity.value) 

can please explain difference?

the worksheet class not have quantity member compiler object it. either need use object variable (as in both of prior examples), or access control using oleobjects property of worksheet:

msgbox wh.oleobjects("quantity").object.value 

for example.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -