![]() |
"Subscript out of range" error for: Workbooks("Test1.xls").Save
I am trying to save an open workbook (Test1.xls) using code in a second open
workbook (Test2.xls). I can not figure out why the following line generates a "Subscript out of range" error. As far as I can tell My syntax is exactly as the help indicates that is should be. Workbooks("Test1.xls").Save I am stuck! Any help would be much appreciated. Thanks, Dave |
"Subscript out of range" error for: Workbooks("Test1.xls").Save
Hi Just12341234,
I could only replicate your error if the second workbook was not open or if the second workbook's name differed fom the name used in the code. In this latter respect, look for a subtle difference such as an initial or trailing space and look both at the workbook name and the name used in your code to ensure that the are identical. --- Regards, Norman "Just12341234" wrote in message ... I am trying to save an open workbook (Test1.xls) using code in a second open workbook (Test2.xls). I can not figure out why the following line generates a "Subscript out of range" error. As far as I can tell My syntax is exactly as the help indicates that is should be. Workbooks("Test1.xls").Save I am stuck! Any help would be much appreciated. Thanks, Dave |
"Subscript out of range" error for: Workbooks("Test1.xls").Sa
I am using WinXP Pro, Excel2003, code is in the Activate sub of "ThisWork"
object. I have checked the spelling and tried on 2 computers. Perhaps I should try from a different subroutine or use a different function. Any other ideas? Thanks, Dave "Norman Jones" wrote: Hi Just12341234, I could only replicate your error if the second workbook was not open or if the second workbook's name differed fom the name used in the code. In this latter respect, look for a subtle difference such as an initial or trailing space and look both at the workbook name and the name used in your code to ensure that the are identical. --- Regards, Norman "Just12341234" wrote in message ... I am trying to save an open workbook (Test1.xls) using code in a second open workbook (Test2.xls). I can not figure out why the following line generates a "Subscript out of range" error. As far as I can tell My syntax is exactly as the help indicates that is should be. Workbooks("Test1.xls").Save I am stuck! Any help would be much appreciated. Thanks, Dave |
All times are GMT +1. The time now is 10:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com