gfroese
11-07-2000, 03:43 PM
I know this has to be simple, but... whatever, no excuses.
I've created a toolbar using images from an imagelist control. When I go to add code to the toolbar, how do I find out which button was pressed.
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
but Button seems to be empty.
TIA
BillSoo
11-07-2000, 04:52 PM
Here's the code from one of my apps...
<PRE><CODE>
Private Sub tblMain_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.index
Case 1
Screen.MousePointer = vbHourglass
Load FormDailyClose
Screen.MousePointer = vbDefault
Case 3
Screen.MousePointer = vbHourglass
Load FormWeeklyClose
Screen.MousePointer = vbDefault
Case 5
Screen.MousePointer = vbHourglass
Load FormPanpoll
Screen.MousePointer = vbDefault
Case 7
Screen.MousePointer = vbHourglass
Load FormMngRpt
Screen.MousePointer = vbDefault
Case 9
ProfitTrackerForm.Show
ProfitTrackerForm.SetFocus
Case 11
Unload MDIFormMain
End Select
End Sub
</PRE></CODE>
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
gfroese
11-07-2000, 06:08 PM
thanks, that is exactly what I needed. didn't realize that Button was a type