Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Main User form closes when I double Click list box to update 2nd f
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Main User form closes when I double Click list box to update 2nd f
add
me.Repaint after userform2.Show "Yomi" wrote: 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! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Main User form closes when I double Click list box to update 2nd f
Thank you. It worked. However I had to remove the controls.value="" from the
userform activate. "Yomi" wrote: 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! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Main User form closes when I double Click list box to update 2
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. "Yomi" wrote: Thank you. It worked. However I had to remove the controls.value="" from the userform activate. "Yomi" wrote: 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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Must I Always Click Twice to Return to My Document from a User Form | Excel Programming | |||
User form closes after opening another one -- Problem with "Unload Me"? | Excel Programming | |||
sum doesn't update total without double-click of cell | Excel Discussion (Misc queries) | |||
2nd Form deselects list box items on main form | Excel Programming | |||
Creating a User Form to update a list | Excel Programming |