Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
err.... code?
As a guess you might try using something like: dim c as range for each c in ChangedRange 'process cell next c Tim. "xlcharlie" wrote in message ... I am using a change event to call a macro when any field in a specified column is changed. The code appears below. Generally, only one cell at a time will be changed, but in the even the user changes multiple cells at once (e.g. pastes values) this code does not work because the target is a range rather than a single cell. Can anyone help me to adapt the code to handle a range rather than a single cell? Thanks much in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry here it comes:
Private Sub Worksheet_Change(ByVal Target As Range) Dim r As Range For Each r In Target.Areas Debug.Print r.Address Next End Sub As you can see, every change will be printed out in the Direct window, try it out Greetings Jonjo "Tim Williams" wrote: err.... code? As a guess you might try using something like: dim c as range for each c in ChangedRange 'process cell next c Tim. "xlcharlie" wrote in message ... I am using a change event to call a macro when any field in a specified column is changed. The code appears below. Generally, only one cell at a time will be changed, but in the even the user changes multiple cells at once (e.g. pastes values) this code does not work because the target is a range rather than a single cell. Can anyone help me to adapt the code to handle a range rather than a single cell? Thanks much in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change event | Excel Programming | |||
Change Cell from Validated List Not Firing Worksheet Change Event | Excel Programming | |||
Chart Values that change based on Change event | Excel Programming | |||
Change minimumscale with the change event of a combobox | Excel Programming | |||
change event/after update event?? | Excel Programming |