Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Another ...
Private Sub Worksheet_SelectionChange(ByVal Target As Range) if target.cells.count 1 then exit sub 'single cell at a time end if if intersect(target, me.range("A18")) is nothing then exit sub end if msgbox "hi" End sub I find that this syntax is easier to modify if I have to monitor other ranges: if intersect(target, me.range("A18:B22,D:E,G18,L98")) is nothing then James wrote: I am trying to use the worksheet_selectionchange event and it doesn't seem to be doing anything. I would like to call a sub routine when the user clicks on cell "a18" I am trying just to see if I can get the event to trigger and no matter what I do nothing happens right now I tried this: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = "A18" Then MsgBox "hello" End If End Sub This is in the worksheet that I want it to run for Do I have to turn on anything for this event to work? Am I missing something? Thanks -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to use selectionchange instead of doubleclick event? | Excel Discussion (Misc queries) | |||
SelectionChange event | Excel Programming | |||
SelectionChange event | Excel Programming | |||
SelectionChange event | Excel Programming | |||
SelectionChange Event | Excel Programming |