Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to detect selected cells in Excel, in VSTO

in VSTO 2005, is there a way to get hold of the selected cells.

Say, user hold the Ctrl key and select multiple cell, is there a way to
get hold of them in VSTO? ActiveCell doesn't seem to be the answer.

THanks a lot
Wei

  #2   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can vba detect what is currently selected? Tim Marsh Excel Programming 2 July 5th 06 12:18 PM
How to detect row number of selected cells? Ivan Excel Programming 1 May 9th 06 05:43 AM
EXCEL, VSTO: Fastest way to access multiple cells Peter T Excel Programming 0 June 1st 05 02:51 PM
EXCEL, VSTO: Fastest way to access multiple cells Alan Excel Discussion (Misc queries) 1 June 1st 05 02:45 PM
Detect selected chart point Mark Excel Programming 1 March 31st 05 12:23 AM


All times are GMT +1. The time now is 10:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"