Toggle Button Help 2

  • Thread starter Thread starter Josiah
  • Start date Start date
J

Josiah

How do I configure a toggle button to toggle a cell between 2 differen
colors (in this case from blue to white and back)? I only have half o
the formula but don't know how to assign the other half of the toggl
to change the cell back to white.

Here's my formula:

Private Sub ToggleButton1_Click()
Range("D20").Select
With Selection.Interior
.ColorIndex = 8
.Pattern = xlSolid
End With
End Sub

How do I add the rest?

Thanks..
 
Josiah,
Answer Toggle question #2, you can assign the function:

Private Sub ToggleButton1_Click()

If ToggleButton2.Value = True Then
Call coloroption1
Else
Call coloroption2
End If

End Sub

Create vb modules by adding a module and calling it
coloroption1() - put your code here
Create color option 2 for your other code

Cathy
 
Back
Top