Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet Change Q
How can I select multiple ranges within a Change event code? I've
tried below but I hit debug Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count = 1 Then If Not Intersect(.Cells, Range("J10:J22", "J28:J40", "J46:J58", "J64:J76", "J82:J94", "J100:J112", "J118:J130")) Is Nothing Then Application.EnableEvents = False .Value = UCase(.Value) Application.EnableEvents = True End If End If End With End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet Change Q
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Const WS_RANGE As String = _ "J10:J22,J28:J40,J46:J58,J64:J76,J82:J94,J100:J112 ,J118:J130" With Target If .Count = 1 Then If Not Intersect(.Cells, Range(WS_RANGE)) Is Nothing Then Application.EnableEvents = False .Value = UCase(.Value) Application.EnableEvents = True End If End If End With End Sub -- __________________________________ HTH Bob "Seanie" wrote in message ... How can I select multiple ranges within a Change event code? I've tried below but I hit debug Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count = 1 Then If Not Intersect(.Cells, Range("J10:J22", "J28:J40", "J46:J58", "J64:J76", "J82:J94", "J100:J112", "J118:J130")) Is Nothing Then Application.EnableEvents = False .Value = UCase(.Value) Application.EnableEvents = True End If End If End With End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet Change Q
Thanks Bob
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to change the pivot chart automaticaly as values in the worksheet change | Excel Worksheet Functions | |||
change formula in a shared worksheet without losing change history | Excel Worksheet Functions | |||
Change in one Worksheet Activates Another Worksheet Change | Excel Programming | |||
Cell value change to trigger macro (worksheet change event?) | Excel Programming | |||
Change Cell from Validated List Not Firing Worksheet Change Event | Excel Programming |