Per ".OnAction" und ".OnKey" Nebeninformation
Martin
ich würde gerne eine Nebeninformation beim Aufruf eines Makros übergeben:
Sub Makro1(Info as Integer)
Msgbox Info
End Sub
Leider klappt das weder per .OnKey noch per .OnAction:
Sub Test1()
Application.OnKey "{F5}", "Makro1(1)"
End Sub
Sub Test2()
With Application.CommandBars(1).Controls.Add(Type:=msoControlButton, Before:=Position, _
Temporary:=True)
.Style = msoButtonIconAndCaption
.Caption = "&Mein Menü"
.OnAction = "Makro1(2)"
.TooltipText = "Test"
.FaceId = 2151
.BeginGroup = True
End With
End Sub
Gibt es da überhaupt eine Möglichkeit?
Viele Grüße
Martin