LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Run macro on cell edit

Oops, your right. I didn't test it. Neither is this but try:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim CurrentValue
CurrentValue = Range("F4").Value

If Application.Intersect(Range("F4"), Target) .Value < CurrentValue
Then
Call Your Macro
End If
End Sub

Mike F
"Defoes Right Boot" wrote in
message ...
Getting closer! That runs the macro as soon as the cell is highlighted,
not
after it's edited, is there any way to do it after the cell is edited?

Thanks

Phil

"Mike Fogleman" wrote:

Right click on the worksheet tab and select View Code. At the top of the
right half of the edit pane click the down arrow beside (General) and
select
Worksheet. Paste this code in the edit window:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("F4"), Target) Is Nothing Then
Call Your Macro
End If
End Sub

The macro you want to run should be in a general code module, not this
one.

Mike F

"Defoes Right Boot" wrote in
message ...
I need to make a macro run whenever cell F4 (strictly speaking the
merged
cells F4:F6) on the current worksheet is edited. I'm sure this must be
possible but can't find anything in the help files or online to tell me
how...

Any ideas?

Thanks

Phil






 
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 to edit formula in cell Steve Vincent Excel Discussion (Misc queries) 3 January 9th 08 12:09 AM
Run Macro after initial cell edit? mrpunkin Excel Programming 5 July 2nd 05 12:35 AM
edit cell by macro helpwithXL Excel Programming 9 April 4th 05 06:21 PM
A Macro to Edit Cell Content jer101 Excel Programming 2 June 17th 04 10:42 PM
Macro to edit cell steve Excel Programming 0 August 21st 03 05:48 PM


All times are GMT +1. The time now is 04:06 AM.

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"