LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
-\) -\) is offline
external usenet poster
 
Posts: 18
Default Remote shut down of Excel

Something that I did realize was that the excel workbooks that are giving
problems are the ones where my function forces a user-form to open and it
stays open until the workbook closes.

So there maybe an event I need to set to clean up the shut down?

Any thoughts?


";-)" wrote in message
...
This code works for ~20 sets of excel workbooks. ONE of the sets (a

single
workbook) always crashes the workbook, with a request to contact MS with

the
error report. The last crash gave me a DDE server crash error.

Is there any thing in the sheet that would cause this?



For i = 1 To rsMaster.RecordCount
'Set xl(i) = New Excel.Application 'Early binding
Set xl(i) = CreateObject("Excel.Application") 'Late Binding
With xl(i)
If admin Then 'hide from user?
.Visible = True
Else
.Visible = False
End If
.Application.WindowState = xlMinimized
.Application.DisplayAlerts = False
.Workbooks.Open FileName:=(pathExcel & rsMaster!Source),
UpdateLinks:=0, ReadOnly:=False
End With
rsMaster.MoveNext
Next i

'...much work done

Set rsLbl = xl(i).Application.Run("getRs", rsLbl) 'call Excel Function

'...much work done

'now end
For Each x In xl()
x.ActiveWorkbook.Saved = True
x.Quit
Set x = Nothing
Next







 
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
Vlookup causes Excel to shut down FinChase Excel Discussion (Misc queries) 1 July 11th 09 03:09 PM
Ignoring code to shut a workbook if it is already shut Cammy Excel Discussion (Misc queries) 1 September 12th 06 06:12 PM
Shut down excel Greg B Excel Discussion (Misc queries) 1 April 26th 05 07:05 AM
Excel instance not shut down Macca Excel Worksheet Functions 0 December 13th 04 03:55 PM
Error causes Excel to shut down quartz Excel Programming 0 January 20th 04 04:01 PM


All times are GMT +1. The time now is 10:39 AM.

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

About Us

"It's about Microsoft Excel"