S
Sam
I've got the following problem:
When I open an excel file from VB6, save it and close it again EXCEL
does not remain in the taskbar, but when I make a copy of a sheet and
save and close the file excel does remain?
Anybody has an idea?
This doesn't work:
Dim XLObj as Public XLObj As Excel.Application
Set XLObj = CreateObject("Excel.Application") XLObj.Workbooks.Open
"c:\test_file.xls"
XLObj.DisplayAlerts = False
XLObj.ActiveWorkbook.Sheets("testsheet").Copy Before:=Sheets(1)
XLObj.ActiveWorkbook.Save
XLObj.ActiveWorkbook.Close
XLObj.UserControl = False
XLObj.DisplayAlerts = True
XLObj.Quit
Set XLObj = Nothing
This works:
Dim XLObj as Public XLObj As Excel.Application
Set XLObj = CreateObject("Excel.Application") XLObj.Workbooks.Open
"c:\test_file.xls"
XLObj.DisplayAlerts = False
XLObj.ActiveWorkbook.Save
XLObj.ActiveWorkbook.Close
XLObj.UserControl = False
XLObj.DisplayAlerts = True
XLObj.Quit
Set XLObj = Nothing
When I open an excel file from VB6, save it and close it again EXCEL
does not remain in the taskbar, but when I make a copy of a sheet and
save and close the file excel does remain?
Anybody has an idea?
This doesn't work:
Dim XLObj as Public XLObj As Excel.Application
Set XLObj = CreateObject("Excel.Application") XLObj.Workbooks.Open
"c:\test_file.xls"
XLObj.DisplayAlerts = False
XLObj.ActiveWorkbook.Sheets("testsheet").Copy Before:=Sheets(1)
XLObj.ActiveWorkbook.Save
XLObj.ActiveWorkbook.Close
XLObj.UserControl = False
XLObj.DisplayAlerts = True
XLObj.Quit
Set XLObj = Nothing
This works:
Dim XLObj as Public XLObj As Excel.Application
Set XLObj = CreateObject("Excel.Application") XLObj.Workbooks.Open
"c:\test_file.xls"
XLObj.DisplayAlerts = False
XLObj.ActiveWorkbook.Save
XLObj.ActiveWorkbook.Close
XLObj.UserControl = False
XLObj.DisplayAlerts = True
XLObj.Quit
Set XLObj = Nothing