
"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.