PC Review


Reply
Thread Tools Rate Thread

Cell Change Event

 
 
Edd
Guest
Posts: n/a
 
      26th Feb 2008
Is there a change event for a specific cell?


 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      26th Feb 2008
No, not for a specific cell per se, but filtering to an individual cell is
quite easy to do. In the VBA editor, within the worksheet code window, click
the left-hand drop down and select Worksheet from the list; then click the
right-hand drop down and select Change from its list. Whenever any cell is
finished being edited, the Change event fires and the Target argument
contains a reference to the cell that was changed. Let's say you wanted to
run code whenever C3 was changed; you could do this...

If Target = Range("C3") Then
' Your code goes here
End If

Rick


"Edd" <(E-Mail Removed)> wrote in message
news:91B0B983-F4A9-4FDF-9548-(E-Mail Removed)...
> Is there a change event for a specific cell?
>
>


 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      26th Feb 2008
The title line should read:

Private Sub Worksheet_Change(ByVal Target as Range)


"Edd" wrote:

> Is there a change event for a specific cell?
>
>

 
Reply With Quote
 
Edd
Guest
Posts: n/a
 
      26th Feb 2008
Thank you Rick and JLGWhiz. That's what I ended up doing and it works
succesfully. I appreciate this forum and you guys..

Ed.


"JLGWhiz" wrote:

> The title line should read:
>
> Private Sub Worksheet_Change(ByVal Target as Range)
>
>
> "Edd" wrote:
>
> > Is there a change event for a specific cell?
> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apply cell change event to single column - WorksheetChange Event MiataDiablo@gmail.com Microsoft Excel Programming 5 4th May 2008 02:28 AM
Event Macro - On Cell Activate - Change Cell Format Bob@1800-mail.com Microsoft Excel Programming 7 7th Nov 2007 03:36 AM
Cell value change to trigger macro (worksheet change event?) =?Utf-8?B?TmVpbCBHb2xkd2Fzc2Vy?= Microsoft Excel Programming 4 10th Jan 2006 01:55 PM
Datagrid cell change event? Where to find event. Roger Microsoft VB .NET 4 29th Mar 2005 09:45 PM
Change Cell from Validated List Not Firing Worksheet Change Event marston.gould@alaskaair.com Microsoft Excel Programming 3 4th Oct 2004 03:00 AM


Features
 

Advertising
 

Newsgroups
 


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