ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Switch Workbooks (https://www.excelbanter.com/excel-programming/292977-switch-workbooks.html)

ronbo

Switch Workbooks
 
I am looking for a statement that will allow me to switch
between open workbooks using a string variable with a
temp name. What I am trying to use, but can not get to
work is;

tmpName2 = Left(ActiveWorkbook.Name, Len
ActiveWorkbook.Name) - 13)

Windows("tmpName2.xls").Activate

Any suggestions would be very much appreciated


Bob Phillips[_6_]

Switch Workbooks
 
Why not just use

tmpName2 = ACtiveworkbook.Name

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Ronbo" wrote in message
...
I am looking for a statement that will allow me to switch
between open workbooks using a string variable with a
temp name. What I am trying to use, but can not get to
work is;

tmpName2 = Left(ActiveWorkbook.Name, Len
ActiveWorkbook.Name) - 13)

Windows("tmpName2.xls").Activate

Any suggestions would be very much appreciated





All times are GMT +1. The time now is 08:15 AM.

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