User form

  • Good day

    I need help with a User form that I created to add data . The form must write data to a spreadsheet with predetermined reference numbers. What code can I use to ensure the new data is written next to the existing . The predetermined ref number will be in a dropdown box and then selected in the box. the data entered must then be written to that selected number . See the attached spreadsheet wit the user form

    I hope someone may be able to assist me

    Thank you

  • I Haven't written the entire code for it but this should explain how to paste the details against the same PRF number. Add this to the Add/Edit button code.

    First 2 rows of the code figure out which row has the matching PRF number. The third row is pasting the Case Number.

    Just copy paste & modify the third row for the rest of the pasting by changing the column "C" to whichever column you need to paste in, and the "Txtcasenumber" to whatever field you need pasting from your form

    Dim PRFrow As String
    PRFrow = Range("D:D").Cells.Find(what:=Me.cboprfnumber.Text, LookIn:=xlValues, lookat:=xlWhole).Row
    Range("C" & PRFrow) = Me.Txtcasenumber

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!