LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Excel not quitting - How to avoid global reference?

I'm using Access 2000 to create charts in Excel. I've read about the
problem Excel not quitting due to a global reference to the automated
application at http://www.tushar-mehta.com/excel/vba/xl_doesnt_quit/

So I've tried to reference objects explicitly. For example:

With xlapp.Workbooks(strXlsFile).Worksheets(sn(i))
.[do stuff]
End With

But Excel still does not quit.

Sometimes I need to assign the return value of a method to an object - when
creating a chart or adding a series, for example:

Dim objChart as Object
Set objChart = xlapp.Workbooks(strXlsFile). _
Worksheets(sn(i)).ChartObjects.Add(Left:=100, Top:=24, _
Width:=650, Height:=500).Chart
With ObjChart
.[do stuff]
End with

Dim objSeries as Object
Set objSeries = objChart.SeriesCollection.NewSeries
With objSeries
.[do stuff]
End With

Is this why Excel is not quitting? Do either of the above two examples
constitute a global reference? Can this code be written so it does not
create a global reference? Could there be some other reason why Excel is
not quitting?

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
Global replace a reference to a worksheet dhstein Excel Discussion (Misc queries) 1 March 13th 09 12:04 AM
Need to avoid a circular reference... Denise Excel Worksheet Functions 1 April 1st 05 08:23 PM
How to Reference Global Variable for external application. ajcross123 Excel Programming 4 July 29th 04 11:18 PM
Quitting Excel without saving manishc[_2_] Excel Programming 1 November 16th 03 11:55 AM
Global file reference change Ronen Ben-Hai Excel Programming 3 November 3rd 03 06:49 PM


All times are GMT +1. The time now is 03:02 PM.

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"