#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Cell Change

Hello.
I want to run some VBA code when a user changes one cell.
Is it possible to capture the change event on a cell, or
the afterupdate event and run a certain VBA code?
If so, how can i do this? Note, the cell in question can
be anyone on the worksheet.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Cell Change

Luis,

The Worksheet_Change event which occurs every time you change something on a
worksheet, will do the job for you. Open the VB editor, select the
particular worksheet in the project explorer and put in the following:

Private Sub Worksheet_Change(ByVal Target As Range)
'Your code
'...
'...
End Sub

HTH,
Nikos

"Luis" wrote in message
...
Hello.
I want to run some VBA code when a user changes one cell.
Is it possible to capture the change event on a cell, or
the afterupdate event and run a certain VBA code?
If so, how can i do this? Note, the cell in question can
be anyone on the worksheet.

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cell Change

Just right click the tab at the bottom of your sheet choose view code
change the left hand drop down box to Worksheet and the right t
Change, now between the two lines on your sheet type Call your VB
code

Simo

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Cell Change


Go to the Visual Basic editor and double click on the
worksheet you need to check on. The code window for the
sheet appears, with 2 drop down lists.

From the first list, Object, select Worksheet. From the
second list, Procedure, select Change. The
Worksheet_Change event appears.

Type your code in the event. To refer to the cell that
has changed, use Target.Address

HTH
Helen





-----Original Message-----
Hello.
I want to run some VBA code when a user changes one cell.
Is it possible to capture the change event on a cell, or
the afterupdate event and run a certain VBA code?
If so, how can i do this? Note, the cell in question can
be anyone on the worksheet.

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
change cell contents when pull down menu choices change jb21 Excel Worksheet Functions 3 November 21st 08 10:34 PM
making copied cells change with change in original cell Jennifer Mcdermeit Excel Worksheet Functions 2 July 20th 06 04:58 PM
change background row color with change of date in a cell Urszula Excel Discussion (Misc queries) 5 May 17th 06 07:56 AM
excel deleting rows last cell does not change. How to change? mrubey Excel Discussion (Misc queries) 3 August 25th 05 08:38 PM
Change workbook sheet reference using cell A1 to change a vairable Reed Excel Worksheet Functions 4 January 20th 05 07:15 PM


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