In my macro I have a userform to filter data. sometimes after I use the macro and then run it later the previously entered data will show back up in the userform. what can i put in my code to clear the data after it filters???
"Unload Me" is just fine when used within the userform code.
advantages of this syntax:
1.you can change the name of the userform without having to edit your code.
2.you know at a glance that it's the form itself and not another you are manipulating
depending of your goal, I think you could also use
tbstartdate = ""
unloading has the advantage of clearing memory, but the userform will have to be loaded each time again, which can be rather annoying when there are much data to load