View Single Post
 
Old 05-10-2011, 08:30 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Hi Cbrehm,

If you want to implement it like that then ControlEmpty should be a method in the userform class, so you shouldn't need to pass the instance of the userform into it. The method's signature would just be:
Code:
Sub ControlEmpty
(or perhaps you could call the procedure "ClearControls"?)

Now, if, for some reason, you did want to pass in a userform object (you don't here as I said above), then your procedure would be:
Code:
Sub controlempty(FormInstance As MSForms.Userform)
If you want to clear all the controls on the userform, then why not just create a new userform object?
__________________
Colin

RAD Excel Blog
Reply With Quote