Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Catching Ctrl+clicks and getting to the selection
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Catching Ctrl+clicks and getting to the selection
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Non-modal dialog tracking Ctrl+click'd selection | Excel Programming | |||
Cancelling Cell Selection using ctrl + click | Excel Discussion (Misc queries) | |||
Ctrl-Space Column Selection No Longer Working | Excel Discussion (Misc queries) | |||
CTRL+SHIFT+END extends selection of cells to last - how reset? | Excel Discussion (Misc queries) |