![]() |
opening a workbook
Hi I am trying to open a workbook I figured out how to open a specifi
workbook if I have the name. My problem is I Want to open a workboo that is named the same name as the activeworkbook plus the name Backup Workbooks.Open ("C:\Documents and Settings\default\Desktop\ORL Schedule\") I am not sure what to put after Schedule\ I did get the name of active workbook as b (but it adds .xls to it) Thanks In Advance RO -- Message posted from http://www.ExcelForum.com |
opening a workbook
Best to save the name of the activeworkbook to a variable,
then remove the .xls from the variable: eg awbname = ActiveWorkbook.Name awbname=left(awbname, len(awbname)-4) Then you can use the variable to complete your string: Workbooks.Open ("C:\Documents and Settings\default\Desktop\ORL Schedule\" & awbname & "Backup.xls") Hope this helps -----Original Message----- Hi I am trying to open a workbook I figured out how to open a specific workbook if I have the name. My problem is I Want to open a workbook that is named the same name as the activeworkbook plus the name Backup Workbooks.Open ("C:\Documents and Settings\default\Desktop\ORL Schedule\") I am not sure what to put after Schedule\ I did get the name of active workbook as b (but it adds .xls to it) Thanks In Advance ROD --- Message posted from http://www.ExcelForum.com/ . |
All times are GMT +1. The time now is 07:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com