2 userforms, 2 UserForm_Initialize()
What ever works! I usually perform a clear, load my boxes and then execute
the .show. Putting the clear and load into the initialize also works.
"Charlie" wrote:
Intesting to know that answer to my unasked ?
...I have my userform_Initialize() to fill lots of textboxes, combos, and
many labels from several worksheets. But if it's not kosher to call
userform_Initialize() I can just put my form loading code under a private sub
and call that from userform_Initialize...
thanks.
"Joel" wrote:
If you are using comboboxes or listboxes on userforms they don't empty
automatically. They maintain the values you last put into them even if you
close your workbook and re-open the workbook. You must perform a .clear to
empty these boxes.
Now for your question. You can use the initialize function if the
initialize function does everything you need it to do. Does your Initialize
function clear comboboxes and listboxes?
"Charlie" wrote:
To refresh the form, I just call UserForm_Initialize()
(Because I discovered .hide & .show again doesn't do this)
But both userforms I have have UserForm_Initialize() even though I named
both userforms something else. Does this matter. My code seems to know to
call the UserForm_Initialize() on the active form...
|