-
Pretend you have the caption "Do This" in a menu.
If the user opens that menu and clicks on "Do this", an action takes place and "Do this" has a check mark on it.
When the user goes back and unchecks, The check goes away and the action reverses.
How do I accomplish this?
Thank you very much!
-
<?>
[code]
'assuming gggg and jjjjj are sub menues
Private Sub gggg_Click()
gggg.Checked = True
jjjjj.Checked = False
MsgBox "gggg is Checked"
End Sub
Private Sub jjjjj_Click()
jjjjj.Checked = True
gggg.Checked = False
MsgBox "jjjjj is Checked"
End Sub
[code]
-
Or just do this...
You can just make the checked property equal to the opposite of the current property value using the NOT operator...
Code:
Private Sub mnuViewStatus_Click()
' This toggles the check mark each time the user clicks the menu item
mnuViewStatus.Checked = Not mnuViewStatus.Checked
End Sub