All,

I'm adding an OptionButton to a sheet. When I click on it, I want to toggle the value. However, the value is always returned as True/1 regardless of it's initial value. What am I doing wrong?

Private Sub ButtonTestAdd()

   ' Spaces Option Button
   buttonLeft = Cells(1, 1).Left + 6
   buttonTop = Cells(1, 1).Top + 0
   
   ActiveSheet.OptionButtons.Add(buttonLeft, buttonTop, 39, 14).Select
   Selection.OnAction = "ManagePnP.SpacesOptionToggleTest"
   Selection.Characters.Text = "Spaces"
   Selection.Name = "SpacesButton"

End Sub


Private Sub SpacesOptionToggleTest()


   Dim buttonValue As Boolean
   buttonValue = ActiveSheet.OptionButtons("SpacesButton").value ' ALWAYS COMES BACK AS TRUE
   
   If buttonValue Then
      ActiveSheet.OptionButtons("SpacesButton").value = False
   Else
      ActiveSheet.OptionButtons("SpacesButton").value = True
   End If

End Sub