Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro - Select cell with no text Dileep Chandran Excel Worksheet Functions 3 December 6th 06 06:01 AM
Run a macro from cell select famdamly Excel Discussion (Misc queries) 3 March 3rd 06 03:51 PM
Macro for cell select comotoman Excel Discussion (Misc queries) 5 October 14th 05 10:06 PM
Pausing a macro to select a cell Jim[_38_] Excel Programming 2 February 5th 04 08:06 PM
Can't select another cell after running a macro.... John[_49_] Excel Programming 1 September 23rd 03 10:01 PM


All times are GMT +1. The time now is 04:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"