I'm trying to simply make a graph in VBA but get the error:
user defined type not defined
I've been able to dim it as an object and produce it, but then I can't edit any of its member properties. I'm running VBA from MS-Access but I'm unsure that would affect it.
Here's my full code
Dim TATchart As ChartObject
Set TATchart = wrkSht.ChartObjects.Add(Left:=200, Width:=375, Top:=50, Height:=225)
With TATchart.Chart
Set ChartType = xlXYScatterLines
.SetSourceData Source:=wrkSht.Range(wrkSht.cells(1, 1), CurCell.offset(0, 1))
Set .Title = "Total Over Time (MAW)"
End With
EDIT: wrkSht is initialized as a worksheet and has been working fine.