Then BigBas' code adjusts to watch AA1 as so:![]()
Private Sub CommandButton1_Click() Application.ScreenUpdating = False If CommandButton1.Caption = "Macro ON" Then CommandButton1.Caption = "Macro OFF" CommandButton1.ForeColor = &HFFFF& CommandButton1.BackColor = &H808080 Range("AA1").Value = "" Else: CommandButton1.Caption = "Macro ON" CommandButton1.ForeColor = &HFFFFFF CommandButton1.BackColor = &H800000 Range("AA1").Value = 1 End If End Sub
![]()
If Range("AA1") = 1 then 'Run the code End If
Bookmarks