Activate sheet in another workbook by its code name

  • Thread starter Thread starter AshMorK
  • Start date Start date
A

AshMorK

Is it possible to activate a sheet in workbook1 by a procedure written in
workbook2 by its code name??
 
With Workbooks("Some Other Book.xls")
.Worksheets(CStr(.VBProject.VBComponents("TheSheetCodeName").Properties("Name"))).Activate
End With
 
Workbooks("Book2").Sheets("Sheet1").Activate

This will activate the workbook as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top