Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mark,
Try this Set myRng= Intersect(Target, Union(Range("C11:AD15"), _ Range("C19:AD23"), Range("C27:P31") If myRng Is Nothing re-using Target just doesn't seem right to me, you would be discarding valuable information -- HTH RP (remove nothere from the email address if mailing direct) "Mark" wrote in message ... I am using Excel 97, I need to use the following behind a worksheet but need to incl,ude the following blocks of cells in the range. It works with 2 but debugs on 3. Private Sub Worksheet_Change(ByVal Target As Excel.Range) 'Sets the range of cells for the code to work if a cell other than the range is altered 'the sub is exited. Set Target = Intersect(Target, Range("C11:AD15", "C19:AD23", "C27:P31")) If Target Is Nothing Then Exit Sub End If Can anyone assist with a solution, please? Many thanks -- Mark |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Private Sub Worksheet_Change(ByVal Target As Excel.Range) | Excel Worksheet Functions | |||
Target cell=range?? | Excel Discussion (Misc queries) | |||
Displaying target range across the Y axis. | Charts and Charting in Excel | |||
Excel VBA .... Worksheet_Change(ByVal Target As Range) question | Excel Programming | |||
what does (ByVal Target As Range) mean | Excel Programming |