How to set the range to use in a MSGraph

G

Guest

I use MaGraph.chart to draw graphics in a report.
I populate the datasheet and all work fine.
The problem is if I use cells (a: p) for the graph and the previous time, I
used (a;z) then the columns (r:z) are still in the graph.
I tried
oGraph.Application.DataSheet.Range("R0:Z4").Delete
oGraph.Refresh
oGraph.Application.Update
etc but there still there.
If I open the datasheet and delete the column, all work fine.
How can I set programmaticaly the range of the datasheet use by the graph ?

Thank a lot.
 
G

Guest

Sorry, I do not read forum for long time.

I do this and it seem work fine.

Set oGraph = Me!Graph.Object
Set oDataSheet = oGraph.Application.DataSheet
oGraph.Application.DataSheet.Range("A0:ZZ4").Delete
' Populate datasheet
oGraph.Refresh
oGraph.Application.Update

Bye
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top