PDA

View Full Version : update data via listbox



Kim75
06-01-2010, 11:06 AM
Hi the forum,

It would be so kind if somebody could help with the following code :

When we :

click to the button “Modif Résa”, that call UserForm3 (Modification de réservation),
insert “01.09.2010” in the textbox (Date reunion)
doubleclick in the second line for example, change some data and validateThat adds a line in sheets “Historic” instead of modifying the line selected via the listbox.



Private Sub Ok_Click()
Dim ligne As Long
ligne = Sheets("Historic").[G:G].Find(ListBox1, LookIn:=xlValues).Row
With Sheets("Historic")
Sheets("Historic").Cells(ligne, 1) = Me.TextBox1
Sheets("Historic").Cells(ligne, 2) = Me.TextBox2
Sheets("Historic").Cells(ligne, 3) = Me.TextBox3
Etc …
Here is my workbook : http://sd-1.archive-host.com/membres/up/779983057/Test_Kim.xls

Thanks for help, Kim.

Bob Phillips
06-01-2010, 11:24 AM
I changed thge form initialize to set TextBox4 to "01.09.2010" but that then brought up the listbox and if I clicked it, mys system froze. What is going on in your app here?

I don't really understanbd the second question.

By the way, you really should name your controls, TextBox4 is meaningless.

Kim75
06-02-2010, 01:36 PM
I don't really understanbd the second question.

About what question you speak ? I asked no question.

Bob Phillips
06-02-2010, 01:40 PM
Then what is 1, 2 and 3?

austenr
06-02-2010, 05:31 PM
I think we have a communication problem.