"subscript out of range" - Excel 
Author Message
 "subscript out of range" - Excel

The code below works for a smaller Excel db, but it fails
when I try to to open a 1MB+ Excel db. How can I fix
that ?

set oxl = wscript.createobject("EXCEL.Application")
oxl.visible = false

oxl.workbooks.open "c:\temp\hr.xls"

oxl.sheets("add").activate 'Error here: subscript out of
range. WHen using small hr.xls it works fine. It crashes
for a larger xls.



Thu, 25 Nov 2004 02:10:39 GMT  
 "subscript out of range" - Excel
The code below works for a smaller Excel db, but it fails
when I try to to open a 1MB+ Excel db. How can I fix
that ?

set oxl = wscript.createobject("EXCEL.Application")
oxl.visible = false

oxl.workbooks.open "c:\temp\hr.xls"

oxl.sheets("add").activate 'Error here: subscript out of
range. WHen using small hr.xls it works fine. It crashes
for a larger xls.



Thu, 25 Nov 2004 02:10:37 GMT  
 "subscript out of range" - Excel
Please ignore this one. Will use .txt instead.

Quote:
>-----Original Message-----
>The code below works for a smaller Excel db, but it
fails
>when I try to to open a 1MB+ Excel db. How can I fix
>that ?

>set oxl = wscript.createobject("EXCEL.Application")
>oxl.visible = false

>oxl.workbooks.open "c:\temp\hr.xls"

>oxl.sheets("add").activate 'Error here: subscript out of
>range. WHen using small hr.xls it works fine. It crashes
>for a larger xls.

>.



Thu, 25 Nov 2004 04:16:50 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. "subscript out of range"

2. "Subscript out of range Error"

3. "Subscript out of Range" error message

4. GetObject("","InternetExplorer.Application") fails in Excel VBA

5. CreateObject("Excel","//server"), MsgBox output

6. GetObject("","InternetExplorer.Application") fails in Excel VBA

7. CreateObject("Excel","//server"), MsgBox output

8. Output to excel - "Subscript out of range" error

9. Excel an......Range("name").Value = "whatever"

10. Undo "Range"?

11. HELP with .Bookmarks("variable").Range.InsertFile

12. Selection.Sort Key1:=Range("??")

 

 
Powered by phpBB® Forum Software