I have a Toggle button that activates code that changes the fill color of the sheet. I want to send up a message box warning the user before it erases the fill in all their cells and if they hit cancel then the code should set the toggle button state back to unclicked and exit the sub. I cant figure out how to set the toggle button state, here is my code:
Public fFillBehavior As Boolean
Sub btnFocusFill_Click(control As IRibbonControl, pressed As Boolean)
fFillBehavior = pressed
If pressed Then
If MsgBox("This will remove the fill color of all your cells, do you still want to continue?", vbOKCancel) = vbOK Then
fillEnable
Else
' ENTER CODE TO CHANGE BUTTON STATE TO UNCLICKED
Exit Sub
End If
Else
fillDisable
End If
End Sub
Any help is appreciated
Thank you.
Bookmarks