Get worksheet property using worksheet variable
问题 I apologize if this has already been answered, but I had no luck searching on this. What’s the best way to access a worksheet property, when the worksheet is referenced by a variable? This one raises a compile error: Sub Tst1(Wk As Worksheet) Debug.Print Wk.pbOK End Sub This one works, but is there a better way? Thanks. Sub Tst2(Wk As Object) Debug.Print Wk.pbOK End Sub 回答1: With a tip from KazJaw, found out that you can get it compile no issues if: Sub Tst1(Wk As Worksheet) Debug.Print