Private Sub Form_Load()
Dim i As Integer
Dim btn As Button
' 添加五个 Button 对象到 Toolbar 控件。
For i = 1 To 5
Set btn = Toolbar1.Buttons.Add(Caption:= i, Style:= tbrDropDown)
' 添加两个 ButtonMenu 对象到每一个Button。
btn.ButtonMenus.Add Text:="Help"
btn.ButtonMenus.Add Text:="Options"
Next i
End Sub
'你的问题是下面的例子
Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As ComctlLib.ButtonMenu)
Select Case ButtonMenu.Index
Case 1
MsgBox "Press the button."
Case 2
MsgBox "Offer some option"
End Select
End Sub