I need to activate a different Sheet on different times. The Sheet I will need to activate will vary based on a cell value (C2). Cell value (C2) in the Sheet named "Report" will contain the name of the Sheet. Can't get to get it done ...
I am trying this, I read elsewhere:
Sheets(Sheets("Report").Range("C2")).Activate
I get:
Run-time error '13' Type mismatch
Maybe you can try this :
ThisWorkbook.Sheets(Sheets("Sheet1").Range("C2").Value).Activate
Your code would have work to if you added .Value
Sheets(Sheets("Sheet1").Range("A2").Value).Activate
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.