View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
R Tanner R Tanner is offline
external usenet poster
 
Posts: 87
Default Run Procedure when The Value of A Cell Changes

On Sep 15, 10:26*am, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote:
You are talking about Event code. Right click the sheet tab you want to catch
the events on and select View Code. The VBE will open. Just above the code
window to the left is a drop down of the Object. Change it from General to
Worksheet. A code stub will be created for you base on selection change. In
the drop down next to the one you just changed is a list of the events.
Select Change and you will get a code stub something like this...

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

Target is the cell that was changed so just do something like this...

Private Sub Worksheet_Change(ByVal Target As Range)
* if target.Address = "$A$1" then msgbox "Tada"
End Sub

--
HTH...

Jim Thomlinson



"R Tanner" wrote:
Hi,


I need to run a procedure when the value of a specific cell changes..
How would I do that?- Hide quoted text -


- Show quoted text -


This didn't work...It doesn't do anything...This is the code I used
and it does not work...

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$A$1" Then MsgBox "tada!"




End Sub


Right now what I am thinking I could do is write each of my different
indicators to a separate sheet and then, once the data in each sheet
reaches a specific row, I will copy it to a workbook specifically for
that indicator and then repeat the process, appending the new data to
the bottom of the workbook, closing it back down, and continuing until
the end of the day.