Refreshing a userform/listbox

T

toocold

Good morning.

I almost have my problem with listboxes sorted out(see Transfering
between listboxes). The Add and Remove buttons are working perfectly.
The only problem remaining... at least until I try to get the
information from the userform to the worksheet... is that I have a
button which allows user to expand on the number of options.

For clearity, the listbox allows 12 options. 7 are predefined in the
listbox, 5 my be added by the user by pressing a button. This button
calls a new userform for the user to enter the additional options. The
problem is that when the user returns to the original userform, the
listbox has not updated for the new options. This was working properly
before when I had the RowSource for the listbox set as the range that I
wanted but now that I am populating the listbox using the
Userform_Initialize procedure, this is not working any more.

How can I force a refresh of my userform... or have it reinitialize?
Right now the code for the second userform is pretty simple... once
they have entered in the options they want, there is a command button
with the following code.

Private Sub BTNReturn_Click()

Options.hide
Selectoptions.show

End Sub

Any ideas?
Cheers,
dw
 
V

Vasant Nanavati

Have you tried unloading and reloading the first UserForm, rather than
hiding and unhiding it?
 
R

Rick Hansen

Hey TooCool,
How are trying pass the values back form UserForm2 back to UserForm1 ?

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top