
Originally Posted by
si_the_geek
You also haven't shown us CreateXLChart (I hope you are setting the location in it!), or CreateReportTitles.
CreateXLChart:
VB Code:
Public Sub CreateXLChart(xlSheetF As Object, xlChartF As Object, RowNum As Integer, _
ChartType As String, ReportName As String)
With xlChartF
.ChartType = ChartType
.SetSourceData xlSheetF.Cells(RowNum, 1).CurrentRegion
.PlotBy = xlColumns
.Location Where:=xlLocationAsObject, Name:=ReportName
End With
End Sub
CreateReportTitles:
VB Code:
Public Sub CreateReportTitles(xlSheetF As Object, strRange As String, hAlign As Variant, _
strVal As String, fSize As Integer)
With xlSheetF
With .Range(strRange)
.HorizontalAlignment = hAlign
.VerticalAlignment = xlCenter
.WrapText = True
.MergeCells = True
.Value = strVal
.Font.Bold = True
.Font.Size = fSize
End With
End With
End Sub