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: 13
Default Problem using =HYPERLINK() formula rather than literal hyperlinks incells

Hi:

I've got hyperlink formulas in my worksheet of the following form:

=HYPERLINK("filename.htm", "displaytext")

1. When I try to count the number of hyperlinks in a cell containing
this formula, it gives me zero (0) hyperlinks:

MsgBox ActiveCell.Hyperlinks.Count

2. When I try to assign the hyperlink to a string value, it gives me
"display" instead of "filename.htm":

Dim myLink As String
myLink = ActiveCell.Value

3. When I try to Dim myLink as Hyperlink, I get a zero count of
hyperlinks, and an Error 91, 'Object variable ... not set'

Dim myLink As Hyperlink
myLink = ActiveCell.Value

4. When I use literal hyperlinks in the cell, as opposed to formulas,
and defind myLink as a string, I can work with both literal strings
and with manually-entered hyperlinks in the below code:

Dim myLink As String
' Dim myLink As Hyperlink

MsgBox ActiveCell.Hyperlinks.Count

If ActiveCell.Hyperlinks.Count 0 Then
myLink = ActiveCell.Hyperlinks(1).Address
Else
myLink = ActiveCell.Value
End If

ThisWorkbook.FollowHyperlink myLink

Any help with using the HYPERLINK() formula instead of literal
hyperlinks would be greatly appreciated.

-- Roy Zider
 
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
Hyperlink Formula Problem Keith Howie Excel Worksheet Functions 2 November 6th 09 02:16 PM
Excel formula using non-literal values jbdmom Excel Worksheet Functions 3 October 15th 08 09:42 PM
Literal quotation marks retained from a formula Chappy Excel Discussion (Misc queries) 3 February 5th 08 04:17 AM
Validating hyperlinks and text for hyperlink Barb Reinhardt Excel Discussion (Misc queries) 4 August 15th 05 10:02 PM
formula is displayed as literal text instead of formula result carlossaltz Excel Discussion (Misc queries) 2 July 1st 05 09:26 PM


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