Absolutely spot on MrShorty sir, that solved my problem. For others that may find this, here is the subroutine that creates a chart from dynamic data as I have found that the order definitely does matter.
Sub History_Chart()
Dim hData As Range
Dim hChart As Shape
Set hData = Range(BatchSearch.Offset(0, 1), BatchSearch.End(xlToRight)).Resize(5)
With inspHist.ChartObjects.Add(Left:=100, Width:=375, Top:=75, Height:=225)
With .Chart
.ChartType = xlColumnClustered
.SetSourceData Source:=hData
.PlotBy = xlRows
.Parent.Name = "Inspection_Chart"
End With
End With
inspHist.Visible = xlSheetVisible
inspHist.Select
End Sub
BatchSearch is a globally defined "Range" Variable declared at the beginning of the module.
Kind regards
Rob
Bookmarks