Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I know you can run a macro when a new variable is entered in a cell, but can you run a macro when a cell is selected? Ta Andi |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("J1:J100"), Target) Is Nothing Then 'Call your Macro Else End If End Sub Change the Intersect Range to whatever cell or range you want as the trigger. This code goes in the Worksheet Module, not a general module. Mike F "Andibevan" wrote in message ... Hi All, I know you can run a macro when a new variable is entered in a cell, but can you run a macro when a cell is selected? Ta Andi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro - Select cell with no text | Excel Worksheet Functions | |||
Run a macro from cell select | Excel Discussion (Misc queries) | |||
Macro for cell select | Excel Discussion (Misc queries) | |||
Pausing a macro to select a cell | Excel Programming | |||
Can't select another cell after running a macro.... | Excel Programming |