Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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... |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you unload the form after each use instead of hiding it, then when you use
..show it will automatically invoke load and initialize. "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... |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ah, that's the word I was looking for, unload. That'll do what i need, nicely.
"JLGWhiz" wrote: If you unload the form after each use instead of hiding it, then when you use .show it will automatically invoke load and initialize. "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... |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I put:
Unload SchedulesForm Load SchedulesForm ....so as to reload everything on the form, but the unload function seems to shut down the whole code... "JLGWhiz" wrote: If you unload the form after each use instead of hiding it, then when you use .show it will automatically invoke load and initialize. "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... |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this problem, too. I have two forms loaded, frm1 and frm2, and
when I use "Unload frm1", it unloads them both. Charlie wrote: I put: Unload SchedulesForm Load SchedulesForm ...so as to reload everything on the form, but the unload function seems to shut down the whole code... "JLGWhiz" wrote: If you unload the form after each use instead of hiding it, then when you use .show it will automatically invoke load and initialize. "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... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
UserForm_Initialize | Excel Programming | |||
UserForm_Initialize | Excel Programming | |||
UserForm_Initialize error | Excel Programming | |||
UserForm_Initialize() | Excel Programming | |||
UserForm_Initialize | Excel Programming |