- ©«¤l
- 91
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 130
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2016-5-14
- ³Ì«áµn¿ý
- 2020-5-17
|
¦^´_ 5# mhl9mhl9
°Ñ¦Ò¬Ý¬Ý- Public Const B1 As String = "text-B1"
- Public Const B2 As String = "text-B2"
- Public Const B3 As String = "text-B3"
- Public Sub abc()
- With Application.CommandBars.Add("´ú¸Õ", msoBarTop, , True)
- .Visible = True
- With .Controls.Add(Type:=msoControlPopup) '°Ñ¼Æ¥N¤J¼Æ¦r
- .Caption = "´ú¸Õ1"
- With .Controls.Add(Type:=msoControlButton)
- .Caption = "´ú¸Õ0"
- .OnAction = "text" '¨S¥N¤J°Ñ¼Æ
- End With
- With .Controls.Add(Type:=msoControlButton)
- .Caption = "´ú¸Õ1-1"
- .OnAction = "'text 1'" '¥N¤J°Ñ¼Æ·|¦b쥻³Ì¥~³òªºÂù¤Þ¸¹¸Ì±¤À§O¥[³æ¤Þ¸¹
- End With
- With .Controls.Add(Type:=msoControlButton)
- .Caption = "´ú¸Õ1-2"
- .OnAction = "'text 1,2'" '¤£¦P°Ñ¼Æ¥Î³r¸¹¤À¶}
- End With
- With .Controls.Add(Type:=msoControlButton)
- .Caption = "´ú¸Õ1-3"
- .OnAction = "'text 1,2,3'"
- End With
- End With
- With .Controls.Add(Type:=msoControlPopup) '°Ñ¼Æ¥N¤J¤å¦r
- .Caption = "´ú¸Õ2"
- With .Controls.Add(Type:=msoControlButton)
- .Caption = "´ú¸Õ2-1"
- .OnAction = "'text ""B1""'" '¤å¦r¥ª¥k°¼¤À§O¥[¤W¨âÓÂù¤Þ¸¹
- End With
- With .Controls.Add(Type:=msoControlButton)
- .Caption = "´ú¸Õ2-2"
- .OnAction = "'text ""B1"",""B2""'"
- End With
- With .Controls.Add(Type:=msoControlButton)
- .Caption = "´ú¸Õ2-3"
- .OnAction = "'text ""B1"",""B2"",""B3""'"
- End With
- End With
- With .Controls.Add(Type:=msoControlPopup) '°Ñ¼Æ¥N¤JÅܼÆ
- .Caption = "´ú¸Õ3"
- With .Controls.Add(Type:=msoControlButton)
- .Caption = "´ú¸Õ3-1"
- .OnAction = "'text B1'"
- End With
- With .Controls.Add(Type:=msoControlButton)
- .Caption = "´ú¸Õ3-2"
- .OnAction = "'text B1,B2'"
- End With
- With .Controls.Add(Type:=msoControlButton)
- .Caption = "´ú¸Õ3-3"
- .OnAction = "'text B1,B2,B3'"
- End With
- End With
- End With
- End Sub
- Public Sub text(Optional Arg1 = "A1", Optional Arg2 = "A2", Optional Arg3 = "A3") '¹w³]¨S¥N¤J°Ñ¼Æªº¹w³]È
- MsgBox Arg1 & Chr(10) & Chr(13) & Arg2 & Chr(10) & Chr(13) & Arg3
- End Sub
½Æ»s¥N½X |
|