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
Post a Comment