LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"