-
I have a menu on my form and let's say the sub-menu is clicked it will display a title name. My question is how can I deleted that title name from that same option from the menu?
As of now I just have
mnuFileTitle
lbltitle.caption ="Welcome"
If that same menu function is clicked again, i want the Title to disappear.
-
Code:
Private Sub mnuFileTitle_Click()
If lbltitle.caption <> "Welcome" Then
lbl.caption = "Welcome"
ElseIf lbltitle.caption ="Welcome" Then
Exit Sub
End If
End Sub
-
Private Sub mnuFile_Click()
mnuFile.Checked = Not mnuFile.Checked
If mnuFile.Checked Then
Me.Caption = "Welcome"
Else
Me.Caption = ""
End If
End Sub