Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2006

Tip: Looking for answers? Try searching our database.

How to detect selected cells in Excel, in VSTO

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hung - 14 Dec 2006 22:25 GMT
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
abhimanyu - 15 Dec 2006 04:09 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.