B
Barkingmadscot
I never done this i am having problem with get my buttons to run a
sub/function i have. See code below. I can create the menu, i can add
the action on click
I have tried .onaction = run("myfuc"), but runs my fucntion as the menu
is created.
Can some point me in the right direction please
******************************************************************************
Set cb = CommandBars.Add(Name:="Engineering", Position:=msoBarTop,
Temporary:=True)
With cb
Set ctlBut1 = cb.Controls.Add(msoControlButton, ID:=1)
Set ctlBut2 = cb.Controls.Add(msoControlButton, ID:=2)
.Visible = True
End With
With ctlBut1
.Caption = "Enable"
.Style = msoButtonCaption
End With
With ctlBut2
.Caption = "Disable"
.Style = msoButtonCaption
End With
********************************************************************************
sub/function i have. See code below. I can create the menu, i can add
the action on click
I have tried .onaction = run("myfuc"), but runs my fucntion as the menu
is created.
Can some point me in the right direction please
******************************************************************************
Set cb = CommandBars.Add(Name:="Engineering", Position:=msoBarTop,
Temporary:=True)
With cb
Set ctlBut1 = cb.Controls.Add(msoControlButton, ID:=1)
Set ctlBut2 = cb.Controls.Add(msoControlButton, ID:=2)
.Visible = True
End With
With ctlBut1
.Caption = "Enable"
.Style = msoButtonCaption
End With
With ctlBut2
.Caption = "Disable"
.Style = msoButtonCaption
End With
********************************************************************************