#1   Report Post  
Aviator
 
Posts: n/a
Default Toggel Boxes

I am wanting to be able to make toggel boxes that:
1. Toggels between 2 colors (White & Yellow).
2. Toggels between 2 values (0 & 1)

(ie. When the toggel is white the value for that cell is 0 and when the
toggel is yellow the value for the cell is 1)

Note: I need to be able to use these values for a formula somewhere else.
  #2   Report Post  
 
Posts: n/a
Default

I am not quite sure what a toggle box is but try this on a
button.
Private Sub ToggleButton1_Click()
If ToggleButton1.BackColor = &HFFFFFF Then
ToggleButton1.BackColor = &HFFFF&
ToggleButton1.Caption = "1"
Else
ToggleButton1.BackColor = &HFFFFFF
ToggleButton1.Caption = "0"
End If
If Range("h4").Value = 1 Then
Range("H4").Value = 0
Range("H4").Interior.ColorIndex = 2
Else
Range("H4").Value = 1
Range("H4").Interior.ColorIndex = 6
End If
end sug
have fun.

-----Original Message-----
I am wanting to be able to make toggel boxes that:
1. Toggels between 2 colors (White & Yellow).
2. Toggels between 2 values (0 & 1)

(ie. When the toggel is white the value for that cell is

0 and when the
toggel is yellow the value for the cell is 1)

Note: I need to be able to use these values for a formula

somewhere else.
.

Reply
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
Non-functional Popup Menu Boxes Jim_M Charts and Charting in Excel 0 January 20th 05 05:27 PM
print text boxes Traverse Charts and Charting in Excel 1 December 22nd 04 11:15 PM
How can I change the size of dialog boxes? Dale Hildebrand Excel Discussion (Misc queries) 2 December 2nd 04 06:12 PM
Text Boxes Graham Parkinson Excel Discussion (Misc queries) 2 December 2nd 04 06:01 PM
Why do my text boxes disappear from my chart when I click out? Robboo Charts and Charting in Excel 1 November 27th 04 06:49 PM


All times are GMT +1. The time now is 06:44 AM.

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"