ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Subscript out of range problem (https://www.excelbanter.com/excel-programming/310041-subscript-out-range-problem.html)

No Name

Subscript out of range problem
 
hi,
you get that error when you tell xl to do something it
cann't do.
i am suspecting this line:
Windows("C C Schedule Regular.xls").Activate
i am guessing but is the file name spelled correctly.
If xl opened "Cat.xls" then xl found that file
otherwise xl can't fine "c c schedule regular.xls" to
activate.

-----Original Message-----
The following lines of code yield a "Subscript out of

range" error 9.


Workbooks.Open Filename:= _
"C:\My Documents\cat.xls"
Windows("C C Schedule Regular.xls").Activate

Both xls documents are in the same folder and spelling

including spaces has
been verified as correct. Why does this yield a Subscipt

out of range error?

.



All times are GMT +1. The time now is 11:05 AM.

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