I posted a similar/same thread yesterdaym, however it has seemed to have dissapeared.
I have created a command button with caption "update" using the following code (wkb = ThisWorkbook).
When the button is 'clicked' I would like it to run the procedure titled "PopulateSummary". Here is my code for that;
The button is created, but nothing happens when it is clicked. I've wasted several hours on this and any help/suggestions would be appreciated.
- Hogie
I have created a command button with caption "update" using the following code (wkb = ThisWorkbook).
Code:
wkb.Worksheets(1).OLEObjects.Add(ClassType:="Forms.CommandButton.1", Link:=False, DisplayAsIcon:=False, Left:=30, Top:=270, Height:=30, Width:=100).Select
Worksheets(1).OLEObjects("CommandButton1").Object.Caption = "Update"
When the button is 'clicked' I would like it to run the procedure titled "PopulateSummary". Here is my code for that;
Code:
Private Sub CommandButton1_Click()
PopulateSummary
End Sub
The button is created, but nothing happens when it is clicked. I've wasted several hours on this and any help/suggestions would be appreciated.
- Hogie