View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Multipage Buttons??

Put a button from Control Toolbox on Sheet1 and put the following code in
the sheet code module.

Private Sub CommandButton1_Click()
Dim cb1 As CommandButton
Set cb1 = Sheets(1).CommandButton1
If cb1.BackColor = &H80FF80 Then
Sheets(1).CommandButton1.BackColor = &HFFFF80
Else
Sheets(1).CommandButton1.BackColor = &H80FF80
End If
End Sub


Be sure you are not in design mode and the button should change from green
to blue and vice versa.


"TotallyConfused" wrote in
message ...
I am wondering if you can make the buttons/tabs on a multipage in an Excel
Userform different color when you click on it???? Can someone please help
me
with this? Thank you very much.