Testing selection against named range

  • Thread starter Thread starter BartParry
  • Start date Start date
B

BartParry

I have a named range and when a user selects a cell I want to see if
their selection is inside that range. Any ideas?
 
right click sheet tab>view code>insert this

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("ifrng")) Is Nothing Then MsgBox "Yes"
End Sub
 
Firstly, have 10k names is a really, really bad idea.

Secondly, having them workbook level is a really, really bad idea.

IMO, a better worksheet design would be more efficient...

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 
Back
Top