fluxcapacitr609
New Member
- Joined
- Feb 21, 2018
- Messages
- 24
Code:
Sub TestMod()
Dim cht As Object
Set cht = Sheets("Jan_2018").ChartObjects.Add(Left:=300, Width:=400, Top:=300, Height:=300)
With cht
.Chart.Type = xl3DColumnClustered
.Chart.SetSourceData Source:=Sheets("Jan_2018").Range("$A$2:$D$2,$A$4:$D$6")
End With
End Sub
I keep getting an error message when trying to run it.
Error message
Method 'Type' of object'_Chart' failed