-Polak
asked on
Resetting All UserForms in a Workbook to Blank
Hi Experts, I'm trying to figure out the best way to reset all of my userforms to blank/false values. Each userform has a "clear all" button built in that does this with that particular form; I've thought about making those subs public and unique and then calling each one of them via a Reset Button. But I don't know if this is the most efficient way. Let me know, thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You should probably do both but in order to be sure I'd need to see the workbook and have instructions on how to get to the point where you want to "reset" the userform.
ASKER
Ended up going with something like this
Sub ResetFHAnalysisEngine()
Unload frmAircraftInventory
Unload frmAircraftUtilization
Unload frmGlobalSettings
Call ResetCosts
Range("SelectedFHAllocationMethod").Value = 0
Range("SelectedFY").Clear
Range("SelectedFHDataSource").Clear
Range("SelectedBudgetConstraint").Clear
Range("SelectedCPFHCalcMethod").Clear
Range("SelectedFHtoDistribute").Clear
Range("SelectedAssetUtilization").Clear
Range("SelectedAircraftInventory").Clear
Range("NeworUsed").Value = "New"
End Sub
Thanks Martin!
You're welcome and I'm glad I was able to help.
In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015
In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015
ASKER
Would it be "more correct" to Unload the userforms then simply add Range("linkednamedrange").