View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
abhimanyu abhimanyu is offline
external usenet poster
 
Posts: 12
Default How to detect selected cells in Excel, in VSTO

I suppose Application.Selection will give you a range of selected
cells.
The Selection object can hold any selection (cells, Pictures etc) so
before using it , check the type it holds by using the as operator like
(Selection as Range). If this returns null, Selection object does not
contain a Range.
Also, there are Areas inside Range, used in case of non-contiguos
selections.

regards