LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default How can I pass an array as TextToDisplay to a hyperlink?

I have a procedure that searches through every sheet (108) in a
workbook for matching data then puts a hyperlink to those data onto a
"Hyperlog" worksheet.

here's part of the code
Option Explicit
Option Base 1

Dim hlText(3) as String
Dim rte as string
Dim num as string
Dim street as string
Dim r as Integer
Dim foundNum as Range
..
..
..
r = 3
hlTarget:=foundNum 'result of Find"
a do loop here as long as matches are being found

hlText(1) = rte: hlText(2) = num: hlText(3) = street

Sheets("HyperLog").Hyperlinks.Add Anchor:=Cells(r, 1), _
Address:="", SubAddress:=rte & "!" & hlTarget, TextToDisplay:=hlText()

If I use hlText() or hlText, I get invalid argument error.
If I use hlText(3) only the 3rd element is passed
hlText(1) & hlText(2) & hlText(3) works except when executing the
hyperlink

Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal
Target As Hyperlink)
CenterOnCell Range Target.SubAddress, Target.TextToDisplay
End Sub
fails at .TextToDisplay
What do I do now coach?

Jay
 
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
combining cells and array from different sheets into an array to pass to IRR() [email protected] Excel Discussion (Misc queries) 3 September 11th 06 07:17 AM
Pass an array to Rank Biff Excel Worksheet Functions 12 June 29th 05 04:15 PM
Hyperlink TexttoDisplay James[_32_] Excel Programming 5 September 27th 04 01:59 PM
Pass array of worksheets to ActiveX DLL (VB6) Hank Scorpio Excel Programming 25 June 21st 04 10:53 AM
Pass array from Project to Excel Sarah[_5_] Excel Programming 2 April 12th 04 07:30 PM


All times are GMT +1. The time now is 06:47 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"