E
etaub
I have added a reference to my VBE in Word to the MS Graph 8.0 library.
I am trying to create a chart programmatically and do this:
Dim MyChart As chart
Set MyChart =
ActiveDocument.InlineShapes.AddOLEObject("MSGraph.Chart.8")
MyChart.Application.datasheet.Range("A1").Value = 55
The chart is created in Word but when I try to do anything with MyChart
, like access the datasheet object, I get
"Object variable or With variable not set" because it still = Nothing.
What am I doing wrong? Thanks in advance.
ed
I am trying to create a chart programmatically and do this:
Dim MyChart As chart
Set MyChart =
ActiveDocument.InlineShapes.AddOLEObject("MSGraph.Chart.8")
MyChart.Application.datasheet.Range("A1").Value = 55
The chart is created in Word but when I try to do anything with MyChart
, like access the datasheet object, I get
"Object variable or With variable not set" because it still = Nothing.
What am I doing wrong? Thanks in advance.
ed