Hi Guys,
Hope that all of you are doing well. I am new to the forum and I really need some help. I am busy with a work project and I am getting the following error
Run-time error '91': Object variable or With block variable on the following.
Option Explicit
Private Sub UpdateLists()
Dim r As Long
r = Columns("A").Find(What:=TextBox1.Value, LookAt:=xlWhole, After:=Range("A2")).Row
TextBox2.Value = wksLookupLists.Range("B" & r)
TextBox3.Value = wksLookupLists.Range("C" & r)
TextBox4.Value = wksLookupLists.Range("D" & r)
TextBox5.Value = wksLookupLists.Range("E" & r)
TextBox6.Value = wksLookupLists.Range("G" & r)
TextBox7.Value = wksLookupLists.Range("H" & r)
TextBox8.Value = wksLookupLists.Range("I" & r)
End Sub
As soon as i run the macro from the sheet itself then it is working, but if i run it from a different sheet then i get this error. Will anyone please help me and give me some advice.
Thanks alot
Bookmarks