#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default Hyperlink

I'm really sorry I didn't catch that
--
Thank you!


"Tim Williams (Theravance)" wrote:

Maybe one of those cells doesn't have a hyperlink.

Tim

On Dec 18, 9:10 pm, Doug wrote:
Now it is giving me a runtime error 9
Subscript out of range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Const RNGS As String =
"A2,A3,A4,A6,A7,A9,A10,A13,A14,A15,A20,A21,A24,A27 ,A28,A29"
Dim x As Integer, arrRngs
Dim c As Range

arrRngs = Split(RNGS, ",")
'If you select A30
If Not Intersect(Target, Range("A30")) Is Nothing Then
For x = LBound(arrRngs) To UBound(arrRngs)
Me.Range(arrRngs(x)).Hyperlinks(1).Follow
Next x
End If

End Sub
--



"Tim Williams" wrote:

my bad:


Tim


Private Sub Worksheet_SelectionChange(ByVal Target As Range)


Const RNGS As String = "A2,A3,A4"
Dim x As Integer, arrRngs
Dim c As Range


arrRngs = Split(RNGS, ",")
'If you select A30
If Not Intersect(Target, Range("A30")) Is Nothing Then
For x = LBound(arrRngs) To UBound(arrRngs)
Me.Range(arrRngs(x)).Hyperlinks(1).Follow
Next x
End If


End Sub


On Dec 17, 2:09 pm, Doug wrote:
I am recieving a runtime error 438
Object doesn't support this property or method
--
Thank you!


"Tim Williams" wrote:
Try this.


Tim


Private Sub Worksheet_SelectionChange(ByVal Target As Range)


Const RNGS As String = "A2,A3,A4,A6,A7,A9,A10,A13,A14," & _
"A15,A20,A21,A24,A27,A28,A29"
Dim x As Integer, arrRngs


arrRngs = Split(RNGS, ",")
'If you select A30
If Not Intersect(Target, Range("A30")) Is Nothing Then
For x = LBound(arrRngs) To UBound(arrRngs)
ActiveSheet.Range(arrRngs(x)).Hyperlink.Follow True
Next x
End If


End Sub- Hide quoted text -


- Show quoted text -


.- Hide quoted text -


- Show quoted text -


.

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
Can't make hyperlink function work for hyperlink to website Frank B Denman Excel Worksheet Functions 15 February 5th 07 11:01 PM
Moving rows with Hyperlink doesn't move hyperlink address Samad Excel Discussion (Misc queries) 15 June 22nd 06 12:03 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM
Macro to Copy Hyperlink to another file as a HYPERLINK, not text... dollardoc Excel Programming 1 April 7th 05 12:47 AM
reading html when hyperlink address not hyperlink text diplayed Kevin Excel Programming 1 December 4th 03 10:13 PM


All times are GMT +1. The time now is 07:06 AM.

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"