Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Excel helper(s)
I am reading a book on VBA and am confused over a point the author is trying to make over controls. With Form controls one can write a simple Sub procedure and assign it to the button no problem. This I understand. For ActiveX controls the author states...'If you try to create an event procedure for an ActiveX control before the control exists, and you try to reference that in your code, you will get compiler errors, so you have to create the event procedure programmaticaly'. What does this mean exactly? If I place an ActiveX button on the worksheet and double-click then I can add my code in the class module that will be of the type: Private Sub CommandButton1_Click( ) There is no problem with this as I see it. Is the author's point that if you add an ActiveX control using VBA then you must write the event procedure in the VBA code too? In other words, you can't write an event procedure first and then create the ActiveX control laterbecause they won't reference each other? The author does offer an example of this method and, whilst I understand the VBA code, I don't understand in principle what the key idea is. I am hoping that somebody on this list has better insights for this layman. Regards Alex |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
activex controls, no "Control tab" | Excel Discussion (Misc queries) | |||
Anchoring Activex Controls | Excel Discussion (Misc queries) | |||
After installing Office XP SP3, Excel ActiveX controls are moved a | Excel Discussion (Misc queries) | |||
ActiveX Controls Display Issue? | Excel Discussion (Misc queries) | |||
ActiveX Controls moving upon print/printpreview | Excel Discussion (Misc queries) |