I have placed 2 sets of data on worksheet(3), and successfully created a column chart on worksheet(1) & another on worksheet(2). I then want to save the spreadsheet, without worksheet(3).
If I delete or clear the worksheet before doing the SaveAs, the charts are garbage.
Charts were created via:
Dim histo As Object
Set histo = .ChartObjects.Add(.Range("B" & curRow).Left, .Range("B" & curRow).Top, _
400, 175).Chart
histo.ChartType = xlColumnClustered
histo.SetSourceData Source:= _
tmpSheet.Range(tmpSheet.Cells(topRow, 1), _
tmpSheet.Cells(tmpCurRow, 5)), _
PlotBy:=xlRows
[Sorry if this isn't the most elegant; it's my first VB program.]
Is there a way to have the charts created on the 2 worksheets, then wipe out its data on the 'tmpSheet' worksheet, then save the workbook?
Thx.
If I delete or clear the worksheet before doing the SaveAs, the charts are garbage.
Charts were created via:
Dim histo As Object
Set histo = .ChartObjects.Add(.Range("B" & curRow).Left, .Range("B" & curRow).Top, _
400, 175).Chart
histo.ChartType = xlColumnClustered
histo.SetSourceData Source:= _
tmpSheet.Range(tmpSheet.Cells(topRow, 1), _
tmpSheet.Cells(tmpCurRow, 5)), _
PlotBy:=xlRows
[Sorry if this isn't the most elegant; it's my first VB program.]
Is there a way to have the charts created on the 2 worksheets, then wipe out its data on the 'tmpSheet' worksheet, then save the workbook?
Thx.