Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Running a macro by changing a cell value

Foiled by Delete!

I use the following code to run a macro called "UpdateE5" whenever cell E4
is edited.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("E4")) Is Nothing Then
If Range("E4").Value < gOldE4 Then
gOldE4 = Range("E4").Value
Application.Run "UpdateE5"
End If
End If
End Sub

It works for any change in cell E4 except when that change is brought about
by the use of the Delete key.
ie, select cell E4, hit Delete, and pooh! Nothing!
Is this possible to overcome?
Regards - Dave B.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default Running a macro by changing a cell value

What version are you using? Works for me....XL2002SP3 & XP

Why not use
If Target.Address instead of Intersect?

OJ

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
Running macro from currently selected cell? GD Excel Discussion (Misc queries) 1 February 10th 09 04:54 PM
Running Macro when a cell value changes Ayo Excel Discussion (Misc queries) 1 April 18th 07 03:09 PM
programmatically changing priority of running excel macro at runti Bing Excel Programming 3 December 26th 04 08:18 PM
Running macro when changing data Pjotr Excel Programming 1 September 12th 04 08:40 AM
Running a macro when a cell value changes Emea training[_2_] Excel Programming 3 August 1st 04 03:07 PM


All times are GMT +1. The time now is 07:23 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"