J
JRudy
Hi,
I have code here to kill Excel Instance, but the process won't ended. Any
sugestion for it ?
btw,I ran my code in MS ACCESS
SUB TEST
Dim oExcel As New Excel.Application
Dim oInvbook As Excel.Workbook
Dim oSheet As Excel.Worksheet
Set oExcel = CreateObject("excel.application")
Set oInvbook = oExcel.Workbooks.Open("\\cd020\db\productionsummary.xls",
, , , , , , , , True)
Set oSheet =
oExcel.Workbooks("productionsummary.xls").Sheets("shift_sum2x")
Call Locate_file
oSheet.Activate
oExcel.Visible = True
oSheet.Copy
oInvbook.Close
ActiveWorkbook.SaveAs Filename:=vPath & " vfname" & ".xls"
ActiveWorkbook.Close
oExcel.Quit
Set oExcel = Nothing
set oInvbook = nothing
set osheet = nothing
END SUB
I have code here to kill Excel Instance, but the process won't ended. Any
sugestion for it ?
btw,I ran my code in MS ACCESS
SUB TEST
Dim oExcel As New Excel.Application
Dim oInvbook As Excel.Workbook
Dim oSheet As Excel.Worksheet
Set oExcel = CreateObject("excel.application")
Set oInvbook = oExcel.Workbooks.Open("\\cd020\db\productionsummary.xls",
, , , , , , , , True)
Set oSheet =
oExcel.Workbooks("productionsummary.xls").Sheets("shift_sum2x")
Call Locate_file
oSheet.Activate
oExcel.Visible = True
oSheet.Copy
oInvbook.Close
ActiveWorkbook.SaveAs Filename:=vPath & " vfname" & ".xls"
ActiveWorkbook.Close
oExcel.Quit
Set oExcel = Nothing
set oInvbook = nothing
set osheet = nothing
END SUB