views:

26

answers:

2

I need to be able to use C# and Excel interop to determine which cells are selected in a workbook/worksheet. It would be nice if there were something like this defined in Excel:

Excel.Range Worksheet.GetSelectedCells();

But I don't find that in any documentation. How can I do this?

tia.

A: 

I guess you can use the ActiveCell property of the Excel Application object. It would return you a Range object.

HTH Rauts

rauts
+2  A: 

Use Application.Selection which will return a Range.

SwDevMan81
I think its a good idea!!!
rauts