When the workbook is open, I initiate the worksheet Pr as below.
But I always get "object variable or with block variable not set" error here:
What is the possible reason that I get this error?
Thank you !
Sincerely,
lolo
Code:
Public Pr as Worksheet
set Pr = ThisWorkbook.Worksheets("Sheet1")
But I always get "object variable or with block variable not set" error here:
Code:
With Pr.ListObjects("Table1")
What is the possible reason that I get this error?
Thank you !
Sincerely,
lolo