Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
runtime Control and code in VBA
i want to add runtime command button and want to add click event to this button.
Pls help me out . Thanx in advance. Anu |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
runtime Control and code in VBA
Anu,
This goes into a userform: Public WithEvents cmdButton As MSForms.CommandButton Sub testit() Set cmdButton = Me.Controls.Add("Forms.CommandButton.1", "cmdMyButton") cmdButton.Caption = "Click Me" End Sub Private Sub cmdButton_Click() MsgBox "Hello" End Sub Rob "Anu" wrote in message ... i want to add runtime command button and want to add click event to this button. Pls help me out . Thanx in advance. Anu |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
runtime error code 1004 | Excel Worksheet Functions | |||
Textbox added to Form at runtime too small, can't control size andchange event won't trigger | Excel Worksheet Functions | |||
Textbox added to Form at runtime too small, can't control size andchange event won't trigger | Excel Worksheet Functions | |||
Changing the height of a commandbar control (edit box) at runtime | Excel Programming | |||
RunTime code problem | Excel Programming |