ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to run on cell change (https://www.excelbanter.com/excel-programming/376814-macro-run-cell-change.html)

XP

Macro to run on cell change
 
I am using Windows XP and Office 2003.

If the user enters or changes the contents of cell D5, I want a specific
macro to run.

What is the best way to accomplish this?

Thanks.

Help?[_2_]

Macro to run on cell change
 
XP,
I use something like this if it helps:
Range("D5").Select
If Range("D5") < " " Then
Application.RUN "YOU MACRO NAME HERE"

"XP" wrote:

I am using Windows XP and Office 2003.

If the user enters or changes the contents of cell D5, I want a specific
macro to run.

What is the best way to accomplish this?

Thanks.


Otto Moehrbach

Macro to run on cell change
 
Paste this macro in the sheet module of your sheet. To access that module,
right-click on the sheet tab, select View Code. "X" out of the module to
return to your sheet. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) = "D5" Then Call YourMacroName
End Sub
"XP" wrote in message
...
I am using Windows XP and Office 2003.

If the user enters or changes the contents of cell D5, I want a specific
macro to run.

What is the best way to accomplish this?

Thanks.





All times are GMT +1. The time now is 09:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com