LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
cct cct is offline
external usenet poster
 
Posts: 2
Default Excel hang when SaveAs

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.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application Hang with Excel Bennett Marco Excel Discussion (Misc queries) 6 November 5th 09 01:21 PM
Excel Application hang Ray Excel Discussion (Misc queries) 1 September 18th 09 12:53 AM
Excel Attachments Hang teenzbutler Excel Discussion (Misc queries) 1 March 30th 07 01:54 AM
excel hang inenewbl Excel Discussion (Misc queries) 1 July 13th 06 12:37 PM
Excel seems to hang and cause asp script to timeout. Justin Excel Programming 0 June 24th 05 04:14 PM


All times are GMT +1. The time now is 07:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"