Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Simple change event. Need guidance.

I want to run a simple If..Then based on a change to a range of cell
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 t
the system date. Seems like it should be simple but I can't figure ou
how to do it. Any help appreciated.

Jakeste

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Simple change event. Need guidance.

Hi
put the following code in your worksheet module:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
if target.cells.count1 then exit sub
If Intersect(Range("E50:E100"), Target) Is Nothing Then Exit Sub
on error goto errhandler
With Target
If .Value < "" Then
Application.EnableEvents = False
me.Range("A3").value=now
me.Range("A3").numberformat="MM/DD/YYYY hh:mm"
End If
End With

errhandler:
Application.EnableEvents = True
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

"Jakester " schrieb im
Newsbeitrag ...
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.

Jakester


---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Simple change event. Need guidance.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 _
And Target.Row = 50 _
And Target.Row <= 100 Then
Range("A3") = Now()
End If
End Sub

= Piku

--
Message posted from http://www.ExcelForum.com

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
Chart Values that change based on Change event ExcelMonkey[_119_] Excel Programming 1 May 15th 04 03:43 AM
Need code for simple change event Jake[_8_] Excel Programming 2 May 14th 04 11:29 PM
Change minimumscale with the change event of a combobox Herbert Chan Excel Programming 1 April 11th 04 12:43 PM
On change event raj Excel Programming 3 December 10th 03 04:23 AM
change event/after update event?? scrabtree23[_2_] Excel Programming 1 October 20th 03 07:09 PM


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