Darren Smith
Well-known Member
- Joined
- Nov 23, 2020
- Messages
- 631
- Office Version
- 2019
- Platform
- Windows
How would you write code in a module to say that the user form command button Is Clicked?
Public ButtonClicked As Boolean
Sub test()
UserForm1.Show
If ButtonClicked Then
MsgBox "Button clicked"
Else
MsgBox "Button not clicked"
End If
End Sub
Private Sub CommandButton1_Click()
ButtonClicked = True
UserForm1.Hide
End Sub
I've watched this posting. What is the purpose of doing things this way.That worked thanks