Hi Jerry
I don't think you can literally place a toolbar on a userform, but you
can fake it with an image control that contains a picture of the
toolbar. Then use code like this to respond to clicks:
Private Sub Image1_MouseDown( _
ByVal Button As Integer, ByVal Shift As Integer, _
ByVal X As Single, ByVal Y As Single)
' adjust next line for number of buttons on image
Const NumButtons = 5
Dim ButtonIdx As Integer
' compute which button
ButtonIdx = Int(NumButtons * (X / CSng(Image1.Width))) + 1
' call appropriate "event procedure"
Select Case ButtonIdx
Case 1
Call ClickedButton1
' Case 2
' Call ClickedButton2
' etc.
Case Else
End Select
End Sub
Private Sub ClickedButton1() ' pseudo-event
MsgBox "Clicked button 1"
End Sub
' etc.
If you want to get really fancy, you can have separate images showing
each of the buttons pressed in, and swap them in as part of the
respective click procedures. This probably won't work if you need to
send the template to others, though, because the only way I see to put
pictures into an image control at run time is to use the LoadPicture
function, which requires an external graphics file.