would it not be easier for your code (and my eyes)
to create a worksheet and/or range variable?
afaik:
the choice of early binding (With a referenced library) or late binding
is NOT related to "lingering object references".
It is done to prevent problems with different versions of similar
libraries e.g. Excel 9 or Excel 11
--
keepITcool
|
www.XLsupport.com | keepITcool chello nl | amsterdam
deko wrote :
Yes, provided that you are planning to keep a reference to Excel in
your project.
Is the issue about avoiding creation of a global reference that can
result in a lingering instance of Excel when xlapp = Nothing fails to
close Excel?
As for using Excel.Chart... how?
I can't seem to get this to work:
Dim xlChart As Excel.Chart
Set xlChart =
xlapp.Workbooks(strXlsFile).Worksheets(sn).ChartOb jects.Add _
(Left:=12.75, Top:=lngTop, Width:=650, Height:=497.25).Chart
xlChart.SetSourceData Source:=xlapp.Workbooks(strXlsFile). _
Worksheets(sn).Range(rst!str2), PlotBy:=xlColumns
xlChart.ChartType = xlLineMarkers xlChart .. etc, etc ...
Is this code correct?