LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default triple state button question

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
replace state names with state code abbreviations se7098 Excel Worksheet Functions 3 July 25th 09 06:41 PM
Converting State Names to State Abbreviations aznate Excel Discussion (Misc queries) 1 October 20th 06 06:52 AM
triple state option buttons Ken Macksey Excel Programming 0 April 13th 05 06:23 PM
state of option button crapit Excel Programming 12 June 3rd 04 10:15 AM
Workbook_Open event and combobox state storage question jw Excel Programming 0 October 23rd 03 12:44 AM


All times are GMT +1. The time now is 11:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"