I need this code for modifying some info of a client. I found useful to add an example of my formulary, so this is how the info appears when I try to modify.
I want to take the information of the new text inserted and put it on the cells of this client who has an ID, that's why I need the number of the row where this exact ID is, to modify those cells.
I don't know how to use VBA and my teacher thinks we should (I don't agree because I'm studying mechanics but OK). Anyway, I've tried all the things you have said to me and still have the '91 error1'.
Private Sub Modify_Click()
Dim FILA As Range
Dim codigo As Integer
Dim Linea As Long
codigo = Codigo_txt.Value
valor_buscado = Me.Codigo_txt
Set FILA = Sheets("Clientes").Range("A:A").Find(valor_buscado, lookat:=xlWhole)
Linea = FILA.Row
Range("B" & Linea).Value = Me.txt_name.Value
Range("C" & Linea).Value = Me.txt_surname.Value
Range("D" & Linea).Value = Me.txt_ID.Value
Range("E" & line).Value = Me.txt_telf.Value
Range("F" & Linea).Value = Me.txt_adress.Value
Range("G" & Linea).Value = Me.txt_CP.Value
Range("H" & Linea).Value = Me.txt_town.Value
Range("I" & Linea).Value = Me.txt_email.Value
End Sub
As I said, I want to get the number of the row with .Row, but it doesn't work.