View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_2_] Dick Kusleika[_2_] is offline
external usenet poster
 
Posts: 66
Default Worksheet Change Event- Refer to Target Address By Name

Jim

If Target.Address = Me.Range("NameofB14").Address Then


--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com


Jm wrote:
Hi,

In the sample code below, how can I substitute a Cell Name for the $B$14
or $C$14?

Thanks,
Jim


Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo Fault
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("B13:X13")) Is Nothing
Then Target(1).Value = UCase(Target(1).Value)
End If
If Target.Address = "$B$14" Then
Do stuff....
End If
If Target.Address = "$C$14" Then
Do More Stuff..
End If
Application.EnableEvents = True
Fault:
Application.EnableEvents = True
End Sub