Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hyperlink Formula Problem | Excel Worksheet Functions | |||
Excel formula using non-literal values | Excel Worksheet Functions | |||
Literal quotation marks retained from a formula | Excel Discussion (Misc queries) | |||
Validating hyperlinks and text for hyperlink | Excel Discussion (Misc queries) | |||
formula is displayed as literal text instead of formula result | Excel Discussion (Misc queries) |