Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi robert,
I would prefer it like the following then all you have to do is add ranges to the Union instead of lots of case lines. Note that a space and underscore is a line break in an otherwise single line of code. Private Sub Worksheet_Change(ByVal Target As Range) Dim rngUnion As Range Dim rngIsect As Range Set rngUnion = Union(Range("A1"), _ Range("B1"), Range("M20:P40"), _ Range("R20:R40")) Set rngIsect = _ Application.Intersect(Target, rngUnion) If Not rngIsect Is Nothing Then MsgBox Target.Address(0, 0) & _ " was just modified" End If End Sub -- Regards, OssieMac |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select Case syntax for multiple conditions ("and")? | Excel Programming | |||
Select Case "Procedure to large" Error | Excel Programming | |||
how do I count only lower case "x" and exclude upper case "X" | Excel Worksheet Functions | |||
Why Error Message "End Select without Select Case"? | Excel Programming | |||
Fix Code: Select Case and "Contains" selection | Excel Programming |