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

  • Thread starter Thread starter Yomi
  • Start date Start date
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!
 
Thank you. It worked. However I had to remove the controls.value="" from the
userform activate.
 
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.
 
Back
Top