PC Review


Reply
Thread Tools Rate Thread

Catching Ctrl+clicks and getting to the selection

 
 
Mac
Guest
Posts: n/a
 
      26th Apr 2008
Hello,
when a user changes the area of a selection (via a Ctrl+click), how do I
intercept this event and after that, how do I get to the selection object and
'read' what's in the selected parts (rows)? Thank you!
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      26th Apr 2008
If you're only interested in a single worksheet, you could use the
Worksheet_selectionchange event.

If you want to try, rightclick on the worksheet tab that should have this
behavior. Select view code and past this into the code window:

Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myArea As Range
For Each myArea In Target.Areas
MsgBox myArea.Address(0, 0)
Next myArea
End Sub

I'm not sure what you're doing, so I just did a message box of the address of
each area.


Mac wrote:
>
> Hello,
> when a user changes the area of a selection (via a Ctrl+click), how do I
> intercept this event and after that, how do I get to the selection object and
> 'read' what's in the selected parts (rows)? Thank you!


--

Dave Peterson
 
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
Catching link clicks inside a message t-timmy Microsoft Outlook Program Addins 2 27th Aug 2008 05:53 PM
Catching Ctrl + Click on a checkbox =?Utf-8?B?Qm9vbg==?= Microsoft Dot NET Framework Forms 4 25th Apr 2007 05:18 AM
Catching Clicks or Whatelse... =?Utf-8?B?Sm9zZSBNYW51ZWwgdmlsb21hcg==?= Microsoft Dot NET 1 8th Mar 2006 03:30 PM
After CTRL+C the selection disappears before pasting =?Utf-8?B?QW5pcnVkZGhh?= Microsoft Excel Crashes 0 27th Sep 2005 07:16 AM
Catching menu clicks in C++? =?Utf-8?B?c2FuZHk5MQ==?= Microsoft Outlook Program Addins 5 2nd Nov 2004 09:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:03 PM.