D
David
Hello,
Anybody ever see the instance where Excel closes but the process still runs
in Windows Task Manager?
The following code explains this further:
Set xlApp = New Excel.Application
xlApp.Visible = True
Set xlBook = xlApp.Workbooks.Open(Forms!Import!txtExcel.Value)
For Each xlSheet In xlBook.Worksheets
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _
"tbl_Temp_RT_" & xlSheet.Name, Forms!Import!txtExcel.Value, True, ""
& xlSheet.Name & "!"
Next
xlBook.Close
xlApp.Quit
Set xlSheet = Nothing
Set xlBook = Nothing
Set xlApp = Nothing
Note: The line visible=true is usually visible=false, but I want to see what
is going on... Excel is closing...
Final Note: If I comment out the FOR EACH block, the Excel process DOES close.
Thanks in advance.
Anybody ever see the instance where Excel closes but the process still runs
in Windows Task Manager?
The following code explains this further:
Set xlApp = New Excel.Application
xlApp.Visible = True
Set xlBook = xlApp.Workbooks.Open(Forms!Import!txtExcel.Value)
For Each xlSheet In xlBook.Worksheets
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _
"tbl_Temp_RT_" & xlSheet.Name, Forms!Import!txtExcel.Value, True, ""
& xlSheet.Name & "!"
Next
xlBook.Close
xlApp.Quit
Set xlSheet = Nothing
Set xlBook = Nothing
Set xlApp = Nothing
Note: The line visible=true is usually visible=false, but I want to see what
is going on... Excel is closing...
Final Note: If I comment out the FOR EACH block, the Excel process DOES close.
Thanks in advance.