Hi,
I have two forms:
- frmMain
- frmPreview
I call frmPreview from frmMain using
In the Form_Load() of frmPreview I'd like to be able to stop loading the form, unload it and go back to frmMain and execute the more code.Code:' This button is on frmMain Private Sub Command1_Click() ' ' some code ' frmPreview.Show vbModal ' if globalVar = True then ' some other code endif ' End Sub
Can I unload a form from its Form_Load()?
Something like this... that actually works
Code:' This is my frmPreview Private Sub Form_Load() If something then globalVar = True Unload me endif End Sub




Reply With Quote