Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Put the code inside the Change or selection_Change events of your sheet. Private Sub Worksheet_Change(ByVal Target As Range) 'code End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'code End Sub To access these, click on the sheet tab in the VBE. Change the left hand dropdown from General to Worksheet, and choose your event sub in the right hand sheet. Highlight the sub name and click F1 to see some examples, as it can be subtle (e.g you don't want the change to trigger the change etc into an infinite loop). regards Paul joecrabtree wrote: To all, I have a macro in a worksheet that I want to run when any data in Column B changes. At the moment it is run by a button click. Is there anyway to do this without rewriting the macro? Thanks in advance, Joseph Crabtree |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro not running when cell value is updated | Excel Programming | |||
updated running total from previous pages | Excel Worksheet Functions | |||
Running macro when changing data | Excel Programming | |||
Running Event Procedure When Cell Updated on Excel Worksheet | Excel Programming | |||
Can't update the data from internet while running macro | Excel Programming |