Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excellent ! Wonderful. Thank you.
I had spoken with several colleagues and most had not used such code / methods enough to recommend anything. On another point, I am running into one of those pesky IF tests that should pass but doesn't. Forum would not work for actual debug assistance. Will pay for help. How can I contact you or a referral consultant, if you have one ? - Don Jarrell "Barb Reinhardt" wrote: I think I'd change this line Set iSect = Intersect(Target,Range("ENtryCells")) I don't see why the AcitveCell would be different from the target here, but who knows. -- HTH, Barb Reinhardt "DonJ_Austin" wrote: I have had the following code working for some time. I am now adding a hyperlink in a cell on the same sheet, but OUTSIDE the Named Range "EntryCells". When I click on the link, I get an error msg "Method 'Intersect' of object '_Global' failed" and the debugger takes me to the "Set iSect ..." line in the routine below. Since I am clicking on a cell with no intersection inside the specified range, I do not understand why I am not falling through the code with iSect = Nothing. I can click on any *other* cell (without a link) outside that range and nothing happens (which is correct). I have found that if I 'long click' on the link and then separately click (regularly) on it, the link is taken without the code problem. This makes no sense and I cannot expect the users to understand or remember that. Is there some mysterious connection between Intersect and hyperlinks on a given worksheet ? Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim iSect As Range If Target.Cells.Count = 1 Then Set iSect = Intersect(ActiveCell, Range("EntryCells")) If iSect Is Nothing Then Range("EntryPromptDisplay") = "" Exit Sub Else Sheets("WorkData").Range("EntryPromptLookup") = Cells(Target.Row, 5) Range("EntryPromptDisplay") = Sheets("WorkData").Range("EntryPromptLookup").Offs et(0, 1) End If End If Set iSect = Nothing End Sub Thank you for any help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
intersect | Excel Programming | |||
Intersect | Excel Programming | |||
Intersect | Excel Programming | |||
Intersect with decimal | Excel Programming | |||
Help with If Not Intersect | Excel Programming |