Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need code for simple change event
I want to run a simple If..Then based on a change to a range of cells
containing text. Basically something like this If Range("E50:E100") changes Then Range("A3") = Now() End if So if the text changes in the range the date of the document updates to the system date. Seems like it should be simple but I can't figure out how to do it. Any help appreciated. Jake |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need code for simple change event
Hi Jake,
Here's one way to do it: Private Sub Worksheet_Change(ByVal Target As Range) Dim rngTest As Range On Error Resume Next Set rngTest = Intersect(Target, Me.Range("E50:E100")) On Error GoTo 0 If Not rngTest Is Nothing Then Me.Range("A3").Value = Now() End If End Sub -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Jake" wrote in message om... I want to run a simple If..Then based on a change to a range of cells containing text. Basically something like this If Range("E50:E100") changes Then Range("A3") = Now() End if So if the text changes in the range the date of the document updates to the system date. Seems like it should be simple but I can't figure out how to do it. Any help appreciated. Jake |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need code for simple change event
Hi
have a look at http://www.mcgimpsey.com/excel/timestamp.html -- Regards Frank Kabel Frankfurt, Germany "Jake" schrieb im Newsbeitrag om... I want to run a simple If..Then based on a change to a range of cells containing text. Basically something like this If Range("E50:E100") changes Then Range("A3") = Now() End if So if the text changes in the range the date of the document updates to the system date. Seems like it should be simple but I can't figure out how to do it. Any help appreciated. Jake |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Chart Values that change based on Change event | Excel Programming | |||
Enable/Disable Worksheet Change Event code | Excel Programming | |||
change event/after update event?? | Excel Programming | |||
Copy Sheets minus Worksheet Change Event code & Macro Buttons | Excel Programming | |||
Excel 2000 ComboBox Code Change event | Excel Programming |