Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I create a routine that will read an excel file and send the content to a
text file. If there's only one excel file, the routine works. If there're multiple, then the second call to that sub will failed with 1004 - Application-defined or object-defined error here is partial code below. PLEASE HELP. Dim objExcel As Excel.Application ...... Set objExcel = New Excel.Application objExcel.Workbooks.Open strFileName -- passed from calling routine For R = 2 To Range("A65536").End(xlUp).Row -- FAIL HERE ......... next R objExcel.Quit Set objExcel = Nothing The second time, the error happend on "For" statement, the open statement does not failed. I add "objExcel.Worksheets("Sheet1").Activate" as test, it failed. There's no EXCEL object from task manager. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help! Run time error 1004, range of object_global failed | Excel Programming | |||
error 1004 Method SaveAs of Workbook failed | Excel Programming | |||
runtime error '1004' object '_Global' failed | Excel Programming | |||
Error Excel: 1004 SaveAs method of Workbook class failed | Excel Programming | |||
HELP!! Excel 2000 Copy of worksheet class failed run time Error 1004 | Excel Programming |