Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_change Method
Hi all, Is it possible to expand the code below to apply it a range of cells. At present it only works on a single cell D13 and consequently C13.Is this possible?, Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Address < "$D$13" Then Exit Sub [c13].Value = Target Range("C13").Select With Selection.Interior .ColorIndex = 35 .Pattern = xlSolid End With Selection.Font.Bold = True End Sub Thanks for your help Michael |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_change Method
-- HTH Bob Phillips "Michael" wrote in message ... Hi all, Is it possible to expand the code below to apply it a range of cells. At present it only works on a single cell D13 and consequently C13.Is this possible?, Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Address < "$D$13" Then Exit Sub [c13].Value = Target Range("C13").Select With Selection.Interior .ColorIndex = 35 .Pattern = xlSolid End With Selection.Font.Bold = True End Sub Thanks for your help Michael |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_change Method
Hi Michael
Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Not Application.Intersect(Range("a1:a20"), Target) Is Nothing Then MsgBox "Hi" End If End Sub You can do this for a range This will show the Msgbox if you change a cell in the range a1:a20 This will show the Msgbox if you change a othere cell then one from the range a1:a20 Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Application.Intersect(Range("a1:a20"), Target) Is Nothing Then MsgBox "Hi" End If End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Michael" wrote in message ... Hi all, Is it possible to expand the code below to apply it a range of cells. At present it only works on a single cell D13 and consequently C13.Is this possible?, Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Address < "$D$13" Then Exit Sub [c13].Value = Target Range("C13").Select With Selection.Interior .ColorIndex = 35 .Pattern = xlSolid End With Selection.Font.Bold = True End Sub Thanks for your help Michael |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Please post this thread a correct full method, method about | New Users to Excel | |||
Please post this thread a complete correct method, method about te | New Users to Excel | |||
Worksheet_Change - NEW to VBA | Excel Worksheet Functions | |||
worksheet_change vs. calculate, and worksheet_change not running | Excel Programming | |||
worksheet_change vs. calculate, and worksheet_change not running | Excel Programming |