Liminalia
11-10-2011, 12:51 PM
Does anybody know an alternate way to hide a userform other then userform.Hide?
I am currently using a userform (frmPostProcess) that shows another userform (frmCustFunction) when a button is clicked. frmCustFunction gathers user input, and returns it back to a text control on frmPostProcess. I need the initial form to be hidden so that the presentation is still visible in the background (the initial form is decently large, but can't be made smaller).
Here is my part of my code that shows and hides the forms. It is located in a function (CustFuncDefine = boolean) called by the Click event of a button on the frmPostProcess userform.
'-- Hide parent userform
frmPostProcess.Hide
'-- Show Custom Function userform
frmCustFunction.Show
CustFuncDefine = True
'-- Show parent userform
frmPostProcess.Show
This, however, creates a nesting of active functions, because every time CustFuncDefine is run, it hits the line to show frmPostProcess, and thus never completes the function until frmPostProcess is unloaded.
I find this to be messy and likely a waste of memory, and could lead to future complications. Is there a better way to simply hide the initial form? I already tried, .Visible = False doesn't work.
I am currently using a userform (frmPostProcess) that shows another userform (frmCustFunction) when a button is clicked. frmCustFunction gathers user input, and returns it back to a text control on frmPostProcess. I need the initial form to be hidden so that the presentation is still visible in the background (the initial form is decently large, but can't be made smaller).
Here is my part of my code that shows and hides the forms. It is located in a function (CustFuncDefine = boolean) called by the Click event of a button on the frmPostProcess userform.
'-- Hide parent userform
frmPostProcess.Hide
'-- Show Custom Function userform
frmCustFunction.Show
CustFuncDefine = True
'-- Show parent userform
frmPostProcess.Show
This, however, creates a nesting of active functions, because every time CustFuncDefine is run, it hits the line to show frmPostProcess, and thus never completes the function until frmPostProcess is unloaded.
I find this to be messy and likely a waste of memory, and could lead to future complications. Is there a better way to simply hide the initial form? I already tried, .Visible = False doesn't work.