I currently have a button in an excel sheet that reverses a selection of data from positive to negative or visa versa. With the macro the font in the button changes from red to green to indicate that the button has been pressed. What i need to add is to change the font back to red if it is pressed again and needs to keep changing everytime the button is pressed.
Here is the current macro
Sub Reverse()
'
' Reverse Macro
'
ActiveSheet.Unprotect
Range("B20:B36").Select
Selection.Copy
Range("W72").Select
ActiveSheet.Paste
Range("X72").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-1]*RC[-6]"
Range("X72").Select
Selection.AutoFill Destination:=Range("X72:X88"), Type:=xlFillDefault
Range("X72:X88").Select
Range("X72").Select
ActiveCell.FormulaR1C1 = "=RC[-1]*R72C18"
Range("X72").Select
Selection.AutoFill Destination:=Range("X72:X88")
Range("X72:X88").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-42
Range("B20").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveSheet.Shapes.Range(Array("Button 68")).Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 4
End With
ActiveSheet.Protect
End Sub
Is there bit of code that can be added to keep switching between the two colours
Thanks
Here is the current macro
Sub Reverse()
'
' Reverse Macro
'
ActiveSheet.Unprotect
Range("B20:B36").Select
Selection.Copy
Range("W72").Select
ActiveSheet.Paste
Range("X72").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-1]*RC[-6]"
Range("X72").Select
Selection.AutoFill Destination:=Range("X72:X88"), Type:=xlFillDefault
Range("X72:X88").Select
Range("X72").Select
ActiveCell.FormulaR1C1 = "=RC[-1]*R72C18"
Range("X72").Select
Selection.AutoFill Destination:=Range("X72:X88")
Range("X72:X88").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-42
Range("B20").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveSheet.Shapes.Range(Array("Button 68")).Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 4
End With
ActiveSheet.Protect
End Sub
Is there bit of code that can be added to keep switching between the two colours
Thanks