Main User form closes when I double Click list box to update 2nd f

Y

Yomi

The code below was got from this site and it allows me to load user form 2
when I double click list box
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim varcounter As Integer
Load UserForm2
UserForm2.TextBox1 = Me.ListBox1.Value
UserForm2.Show
If UserForm2.bUpdate Then
'Update
End If
Unload UserForm2

...... However, on clicking ok(update) or cancel button on the user form 2,
the content of the list box and on all the controls on the main form
disappears. HELP!
 
Y

Yomi

Thank you. It worked. However I had to remove the controls.value="" from the
userform activate.
 
P

Patrick Molloy

I'm happy that it worked, though i don't understand your comment. the code
piece you quote isn't in th ecdoe that you gave us.
 

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