Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Intersect & Hyperlink

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
intersect ranswert Excel Programming 12 February 6th 08 01:15 PM
Intersect Arne Hegefors Excel Programming 1 July 25th 06 09:38 AM
Intersect [email protected] Excel Programming 2 July 19th 06 10:41 PM
Intersect with decimal Nicke Excel Programming 0 November 20th 03 02:02 PM
Help with If Not Intersect derek Excel Programming 6 July 11th 03 04:39 PM


All times are GMT +1. The time now is 07:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"