PC Review


Reply
Thread Tools Rate Thread

How to detect selected cells in Excel, in VSTO

 
 
Hung
Guest
Posts: n/a
 
      14th Dec 2006
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

 
Reply With Quote
 
 
 
 
abhimanyu
Guest
Posts: n/a
 
      15th Dec 2006
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
VSTO Ribbon - Any way to Get Control that Has Focus, or Selected T Paulem0071 Microsoft Outlook Program Addins 0 3rd Dec 2008 04:59 PM
How to detect row number of selected cells? =?Utf-8?B?SXZhbg==?= Microsoft Excel Programming 1 9th May 2006 05:43 AM
Progamatically Formating Cells within VSTO for Excel Application Development using C# Sharad Vyas Microsoft Excel Programming 5 10th Dec 2005 04:42 AM
EXCEL, VSTO: Fastest way to access multiple cells =?Utf-8?B?QWxhbg==?= Microsoft Excel Programming 1 1st Jun 2005 02:51 PM
EXCEL, VSTO: Fastest way to access multiple cells =?Utf-8?B?QWxhbg==?= Microsoft Excel Misc 1 1st Jun 2005 02:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:39 AM.