View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
c depalma c depalma is offline
external usenet poster
 
Posts: 1
Default right click sheet tabview codeinsert thisPrivate Sub

I have a problem where i could 10k named ranges. When i select an area of the sheet, i need to know which of those named ranges is selected. I have it working by looping over Workbook.names collection, but that takes 14 seconds. Any other way to ask excel what named ranges are intersecting the selection?

On Monday, July 16, 2007 12:19 PM BartParr wrote:


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?



On Monday, July 16, 2007 12:30 PM Don Guillett wrote:


right click sheet tabview codeinsert this

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("ifrng")) Is Nothing Then MsgBox "Yes"
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

wrote in message
ps.com...



On Monday, July 16, 2007 2:08 PM BartParr wrote:


Nice. Figured there was something like that out there.



On Monday, July 16, 2007 3:05 PM Don Guillett wrote:


Glad to help

--
Don Guillett
Microsoft MVP Excel
SalesAid Software