M
Martin Stender
HI all - I grabbed the commandbar code below from the help-examples in
PPT, but it keeps failing with two different error messages: some of
the time, the 'showPopup' function fails with "invalid procedure call
or argument'), and sometime the menu will show once, and the next time
it is being called, it fails.
Private Sub CommandButton1_MouseUp(ByVal Button As Integer, ByVal Shift
As Integer, ByVal X As Single, ByVal Y As Single)
If Button = 2 Then
Set mybar = CommandBars.Add _
(Name:="Custom", Position:=msoBarPopup, Temporary:=False)
With mybar
.Controls.Add Type:=msoControlButton, Id:=3
.Controls.Add Type:=msoControlComboBox
End With
mybar.ShowPopup
End If
End Sub
Any ideas?
Best regards
Martin
PPT, but it keeps failing with two different error messages: some of
the time, the 'showPopup' function fails with "invalid procedure call
or argument'), and sometime the menu will show once, and the next time
it is being called, it fails.
Private Sub CommandButton1_MouseUp(ByVal Button As Integer, ByVal Shift
As Integer, ByVal X As Single, ByVal Y As Single)
If Button = 2 Then
Set mybar = CommandBars.Add _
(Name:="Custom", Position:=msoBarPopup, Temporary:=False)
With mybar
.Controls.Add Type:=msoControlButton, Id:=3
.Controls.Add Type:=msoControlComboBox
End With
mybar.ShowPopup
End If
End Sub
Any ideas?
Best regards
Martin