ExcelBanter

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

Tom Ogilvy

Subscript out of range error
 
Do you use syntax like

Workbooks("Myworkbook").Worksheets("Sheet1")

If so, then
Workbooks("Myworkbook") is the cause (assuming you have a sheet1)

Always use the extension and you won't have problems

Workbooks("Myworkbook.xls").Worksheets("Sheet1")

--
Regards,
Tom Ogilvy

Steve wrote in message news:3fd64963$0$1440$afc38c87@...
Hello everyone. Is there any reason why a module will run fine on my
machine, but others who try to run it get a run time error 9 - subscript

out
of range error? Is there a setting that needs to be adjusted on their
machines?

Thanks!

-Steve







All times are GMT +1. The time now is 01:29 AM.

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