PDA

View Full Version : Query active cell in Graph DataSheet?



wrecks
05-04-2009, 03:31 PM
I have a Word document with several MS Graph charts.

Let's say that the user has opened the DataSheet for a Graph, and clicked on a cell. Call that cell the "Active Cell". How can I determine the "Active Cell" via ActiveX?

I can use Selection.Range.InlineShapes.Count to see if the user has selected a graph.

Assuming Count=1, then I can use ole=Selection.Range.InlineShapes(1).OLEFormat and then ole.Edit just to make certain that the DataSheet is open. (If the DataSheet is already open, this does no harm.)

Then I can get at the DataSheet with ole.Object.Application.DataSheet and see Cells and Rows and etc.

But how to query the Active Cell??