Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello !
Given the following code : ' == clsBtn Class module Private WithEvents mCmdOk AS MSForms.CommandButton Public Property Set Ok (cmd AS MSForms.CommandButton) Set mCmdOk = cmd End Property Private Sub mCmdOk_Click() MsgBox "Ok button clicked" End Sub ' == User Form Private objBtn AS clsBtn Private Sub UserForm_Initialize Dim objBtn as New clsBtn Set objBtn.Ok = Me.ExistingCmdBtnOnThisForm End Sub When I click on "Me.ExistingCmdBtnOnThisForm", I expect the MsgBox to pop, but nothing happens. Any idea why it doesn't work ? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
There are no "BeforeCalculate" or "AfterCalculate" events | Excel Discussion (Misc queries) | |||
CommandBars("Worksheet Menu Bar").Controls("Tools").Enabled = Fals | Excel Programming | |||
Repost: ListBox Headings - customized! Class Module (warning: long post)" | Excel Programming | |||
Can ActiveX controls be "disabled" and "enabled"? | Excel Programming | |||
What events can be captured in a Class Module? | Excel Programming |