I need to find and modify a row only if the first column of the row is equal to the label caption of the form. Below the code:
Private Sub CommandButton2_Click()
Dim I as integer
For I = 2 to Worksheets(“sheet1”).Range(“A10000”).end(xlUp).row
If cells (i, 1) = label1.caption then
Cells (i, 3).Value = TextBox1.text
End if
Next I
End sub
Of course, my entire approach may be wrong! If you have a suggestion of another way to do this please tell me. Thanks in advance for your help.
Aucun commentaire:
Enregistrer un commentaire