Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
MS help
one way would be to add a textbox - visible = false to a new userfor. set the
listbox's event to load the form, populate the text box then chow the form habe a cancel button and an ok button - these set a public boolean to false or true then hide the form. the callign routine does nothing but unloads the form. the true updates the listbox userform1 objecys: listbox1 code: Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean) Load UserForm2 UserForm2.TextBox1 = Me.ListBox1.Value UserForm2.Show If UserForm2.bUpdate Then ' update End If Unload UserForm2 End Sub userform2 object: btnOK, BbtnCancel, textbox1 code: Option Explicit Public bUpdate As Boolean Private Sub bntCancel_Click() Me.Hide End Sub Private Sub btnOK_Click() bUpdate = True Me.Hide End Sub "Yomi" w rote: I am working with userform and I want to double-click records in a list box such that and update window could come up,so that I can edit the records.Can someone help |