0
I’m experimenting VBA and managed to add data to a BD in sheet 2.
And now I tried to do to show the data on sheet 1 where I choose the ID and it shows the data entered there, but it’s giving me a mistake.
Sub Busca()
Dim valor As Integer
valor = InputBox("Numero:", "buscar")
Range("C24") = valor
Range("C28") = Application.WorksheetFunction.VLookup(valor, Sheets(2).Range("A:B"), 2, False)
End Sub
The mistake I have is
Run time error 1004
It is not possible to obtain the Vlookup property of the Worksheetfunction class
This function has worked before, but now gives me error and I do not understand why.