C
cct
Dear all,
My environment:-
Windows Server 2003
Office XP with SP3
dotnet 1.1 with SP1
ASP.net with VB Com dll.
The following code (in VB com dll) is working fine when Excel file is
without Macros :-
Set xlApp1 = New Excel.Application
xlApp1.EnableEvents = False
Set xlWBook = xlApp1.Workbooks.Open(sourcefile, False, , , Passwd)
xlApp1.EnableEvents = True
Dim filename As String
filename = "ABC.xls"
On Error Resume Next
Kill filename
Method #1:-
xlWBook.SaveAs filename, , "" --> No error, Excel hang in Task Manager
Method #2:-
xlApp1.EnableEvents = False
xlApp1.DisplayAlerts = False
xlWBook.SaveAs filename, , "" --> Error! Document not saved.
If I manually open the excel file through Excel Application, I am able to
save as another file without error.
Does anyone know how to fix this.
Thanks in advance.
My environment:-
Windows Server 2003
Office XP with SP3
dotnet 1.1 with SP1
ASP.net with VB Com dll.
The following code (in VB com dll) is working fine when Excel file is
without Macros :-
Set xlApp1 = New Excel.Application
xlApp1.EnableEvents = False
Set xlWBook = xlApp1.Workbooks.Open(sourcefile, False, , , Passwd)
xlApp1.EnableEvents = True
Dim filename As String
filename = "ABC.xls"
On Error Resume Next
Kill filename
Method #1:-
xlWBook.SaveAs filename, , "" --> No error, Excel hang in Task Manager
Method #2:-
xlApp1.EnableEvents = False
xlApp1.DisplayAlerts = False
xlWBook.SaveAs filename, , "" --> Error! Document not saved.
If I manually open the excel file through Excel Application, I am able to
save as another file without error.
Does anyone know how to fix this.
Thanks in advance.