View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
deko[_3_] deko[_3_] is offline
external usenet poster
 
Posts: 62
Default How to reference worksheet name with spaces?

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?