Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You mean four states ( the starting state, Dog, Cat and Snake).
Assuming that your button starts off with a picture of a mouse, try this. In the general area (above the Sub) put Public MyState Private Sub Mybutton_click() Select Case Mystate Case 0 'Change picture to Dog Run your code For Mouse (if any) MyState = Mystate +1 Case 1 'Change picture to Cat Run code for Dog MyState = MyState +1 Case 2 'Change picture to Snake Run code for Cat MyState =MyState +1 Case 3 'Change picture to Mouse Run code for Snake MyState = 0 Case Else 'Change picture to Mouse MyState = 0 End Select End Sub HTH Henry "filo666" wrote in message ... I want to made a triple state button in a customised toolbar, when this button is pressed the button image is changed to a dog and a macro is run; when the button is presed again the button image changes to a cat and a different macro is run, and finally when the button is pressed again a third macro Is run and the button image changes to a snake, How to accomplish this (pd. I don't know nothing about how to operate menu bars and buttons with VB)? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
replace state names with state code abbreviations | Excel Worksheet Functions | |||
Converting State Names to State Abbreviations | Excel Discussion (Misc queries) | |||
triple state option buttons | Excel Programming | |||
state of option button | Excel Programming | |||
Workbook_Open event and combobox state storage question | Excel Programming |