View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_5_] Otto Moehrbach[_5_] is offline
external usenet poster
 
Posts: 27
Default If Range.Name question

Thanks Leo, Chip, J.E. and John. My forehead is getting flat from hitting
it with the palm of my hand. Otto
"Otto Moehrbach" wrote in message
...
Excel XP & Win XP
I want to check if the ActiveCell range name is "Hello". I thought this
little macro would work but it returns a "No". What is the correct way to
make this check? Thanks for your help. Otto
Sub TestName()
If ActiveCell.Name = "Hello" Then
MsgBox "Yes"
Else
MsgBox "No"
End If
End Sub