![]() |
Run Macro When Select Cell
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 |
Run Macro When Select Cell
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 |
All times are GMT +1. The time now is 07:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com