sspatriots
Well-known Member
- Joined
- Nov 22, 2011
- Messages
- 572
- Office Version
- 365
- Platform
- Windows
Hi,
I have a Userform that has a button on it that opens another Userform. When I try and close the secondary Userform with a "Close" button (code below), it automatically closes my primary Userform that I launched that secondary Userform from. I would like to just close the secondary Userform and leave the primary Userform open. I have some code below that I started, but it still closes everything.
The Primary Userform is named: Job_Status_PM
The Secondary Userform is named: Legend
Any suggestions would be greatly appreciated.
Thanks, SS
I have a Userform that has a button on it that opens another Userform. When I try and close the secondary Userform with a "Close" button (code below), it automatically closes my primary Userform that I launched that secondary Userform from. I would like to just close the secondary Userform and leave the primary Userform open. I have some code below that I started, but it still closes everything.
The Primary Userform is named: Job_Status_PM
The Secondary Userform is named: Legend
Any suggestions would be greatly appreciated.
Thanks, SS
VBA Code:
Private Sub cmdClose_Click()
Unload Legend
Job_Status_PM.Show
Job_Status_PM.cmdClose.SetFocus
End Sub