Consulting

Results 1 to 5 of 5

Thread: update data via listbox

  1. #1

    update data via listbox

    Hi the forum,

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

    When we :
    1. click to the button “Modif Résa”, that call UserForm3 (Modification de réservation),
    2. insert “01.09.2010” in the textbox (Date reunion)
    3. doubleclick in the second line for example, change some data and validate
    That 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...7/Test_Kim.xls

    Thanks for help, Kim.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    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.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Quote Originally Posted by xld
    I don't really understanbd the second question.
    About what question you speak ? I asked no question.

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Then what is 1, 2 and 3?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    I think we have a communication problem.
    Peace of mind is found in some of the strangest places.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •