Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change cell contents when pull down menu choices change | Excel Worksheet Functions | |||
making copied cells change with change in original cell | Excel Worksheet Functions | |||
change background row color with change of date in a cell | Excel Discussion (Misc queries) | |||
excel deleting rows last cell does not change. How to change? | Excel Discussion (Misc queries) | |||
Change workbook sheet reference using cell A1 to change a vairable | Excel Worksheet Functions |