type of selection if selection is chart

C

Chimanrao

this is what msdn says

"The returned object type depends on the current selection (for
example, if a cell is selected, this property returns a Range object).
The Selection property returns Nothing if nothing is selected."

What is the type of selection object if a chart is selected?

I am using C++ and COM.

IDispatch *pDispatch = m_Application->GetSelection();
if (pDispatch == NULL)
return ;

CComQIPtr<MSExcel::Range> ranges(pDispatch);
if (ranges == NULL)
return ;

If the user selects a chart the ranges object is null, I tried querying
for _Chart, even that is null.
 

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