ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Activate sheet in another workbook by its code name (https://www.excelbanter.com/excel-programming/417731-activate-sheet-another-workbook-its-code-name.html)

AshMorK

Activate sheet in another workbook by its code name
 
Is it possible to activate a sheet in workbook1 by a procedure written in
workbook2 by its code name??

Bob Phillips[_3_]

Activate sheet in another workbook by its code name
 
With Workbooks("Some Other Book.xls")
.Worksheets(CStr(.VBProject.VBComponents("TheSheet CodeName").Properties("Name"))).Activate
End With


--
__________________________________
HTH

Bob

"AshMorK" wrote in message
...
Is it possible to activate a sheet in workbook1 by a procedure written in
workbook2 by its code name??




Andym

Activate sheet in another workbook by its code name
 
Workbooks("Book2").Sheets("Sheet1").Activate

This will activate the workbook as well.

"AshMorK" wrote:

Is it possible to activate a sheet in workbook1 by a procedure written in
workbook2 by its code name??



All times are GMT +1. The time now is 10:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com