Help, One form Closes another Form when closing itself...
For some reason, I can't post back to your last post, so:
In my scenario,
Userform1 is shown
Userform1 executes this code
me.Hide ' userform1 is hidden
Userform2.show 'Useform2 is shown and code waits until userform2
' is hidden or unloaded
me.show ' Userform 2 has been hidden or unloaded, reshow myself
Code in Userform2 unloads userform2.
--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote:
also
frmNotFound.Show
probably would be better with
me.Hide
frmNotFound.Show
me.show
--
Regards,
Tom Ogilvy
"MikeZz" wrote:
I have a form that loads when a workbook is open - call it 1st Form.
1st Form compares the current user to a list in the file.
If they are not on the list, it runs the 1st line of code below which calls
up another frmNotFound (aka 2nd Form) with some messages and buttons.
1st Form ShowModal = false, 2nd Form ShowModal = true
The 2nd userform has a "Continue" button with the second line of code
attached below. Basically, I want it to close this 2nd form and continue
loading the 1st form.
Upon returning to 1st form, the rest of the code is executed but at the very
end, it seems to close itself and I'm not sure why.
Code in the 1st form which calls the 2nd form:
-----------------------------------------------------
frmNotFound.Show
Code in the 2nd form which closes itself... but needs to return to the 1st
form:
-----------------------------------------------------
Private Sub cmdNon_Click()
Unload frmNotFound
End Sub
Thanks,
MikeZz
|