F
Frans van Zelm
Hi,
((VB-editor of Excel 2K, Dutch version; Windows 2K Server))
I hoped to make a custom button work by:
Sub BrandNewBarAndButton()
Dim myBar As CommandBar
Dim myControl
Set myBar = Application.VBE.CommandBars.Add("Extra", , False, True)
myBar.Visible = True
Set myControl = myBar.Controls.Add(msoControlButton, , , 1)
With myControl
'Other properties set
.OnAction = "LittleClick"
End With
End Sub
The precedure LittleClick in the same module. But ... clicking the
button has no result.
I also noticed the Click-event but I expect that then a class module ;-(
etc. is needed.
Thanks for a reply, Frans
((VB-editor of Excel 2K, Dutch version; Windows 2K Server))
I hoped to make a custom button work by:
Sub BrandNewBarAndButton()
Dim myBar As CommandBar
Dim myControl
Set myBar = Application.VBE.CommandBars.Add("Extra", , False, True)
myBar.Visible = True
Set myControl = myBar.Controls.Add(msoControlButton, , , 1)
With myControl
'Other properties set
.OnAction = "LittleClick"
End With
End Sub
The precedure LittleClick in the same module. But ... clicking the
button has no result.
I also noticed the Click-event but I expect that then a class module ;-(
etc. is needed.
Thanks for a reply, Frans