#1   Report Post  
Posted to microsoft.public.excel.misc
Ed Ed is offline
external usenet poster
 
Posts: 279
Default Run macro

Hello I have the following macro:


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$D$9" Then
Call Calculation
End If
End Sub


How do I set it up to run the macro "Calculation" after I changed the value
in D9 rather than when I select cell D9?

thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Run macro

Ed,

Use the change event:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$9" Then
Call Calculation
End If
End Sub

HTH,
Bernie
MS Excel MVP


"Ed" wrote in message
...
Hello I have the following macro:


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$D$9" Then
Call Calculation
End If
End Sub


How do I set it up to run the macro "Calculation" after I changed the value
in D9 rather than when I select cell D9?

thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
Ed Ed is offline
external usenet poster
 
Posts: 279
Default Run macro

That was simple... thanks!!



"Bernie Deitrick" wrote:

Ed,

Use the change event:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$9" Then
Call Calculation
End If
End Sub

HTH,
Bernie
MS Excel MVP


"Ed" wrote in message
...
Hello I have the following macro:


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$D$9" Then
Call Calculation
End If
End Sub


How do I set it up to run the macro "Calculation" after I changed the value
in D9 rather than when I select cell D9?

thanks




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
error when running cut & paste macro Otto Moehrbach Excel Worksheet Functions 4 August 9th 06 01:49 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Highlight Range - wrong macro, please edit. Danny Excel Worksheet Functions 8 October 19th 05 11:11 PM


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

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

About Us

"It's about Microsoft Excel"