Patriot2879
Well-known Member
- Joined
- Feb 1, 2018
- Messages
- 1,259
- Office Version
- 2010
- Platform
- Windows
Hi I am trying to put a code together into a command button which opens the userform1, but if someone else has the userform open already I want a msgbox pop up to say that ‘userform is in use’, I have put the following code togetherbut getting no joy. Hope you can help?
Code:
Private Sub CommandButton1_Click()
ThisWorkbook.Save
UserForm1.Show
If CurrentProject.AllForms("UserForm1").IsLoaded = False Then
' Form is closed
Else
MsgBox "userform is in use"
' Form is open
End If
End Sub
Last edited: