View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David McRitchie[_2_] David McRitchie[_2_] is offline
external usenet poster
 
Posts: 134
Default Excel hyperlink problems

Hi Peter,
What are you hyperlinking to ?
- cell in another worksheet
- cell in another workbook worksheet
- web page

What do you mean by don't take up the desired value ?
Do you mean they are not displaying the value of
they hyperlinked to cell ?

What do you mean by the old ones ? Different version of Excel ?
Not created by your program code ?


I have some programmed hyperlink examples in
http://www.mvps.org/dmcritchie/excel/buildtoc.htm

The following converts a range of cells with sheetnames
to hyperlinks.

Sub trevor001()
Dim Cell As Range
For Each Cell In Selection
ActiveSheet.Hyperlinks.Add Anchor:=Cells(Cell.Row, Cell.Column), _
Address:="", SubAddress:="'" & Sheets(Cell.Value).Name & "'!A1"
Next Cell
End Sub

Without a snippet of code it's hard to tell what you have in
code, along with what you get and what you want.

If I create a hyperlink with Right-Click, the hyperlink will point to the
wrong place after inserting or deleting rows. The example of
using Hyperlink Worksheet Function gets around that problem
and gets around having to code the pathname in Excel 97
and 2000 even when on the same workbook and same worksheet.

Some examples of the HYPERLINK Worksheet Function
http://www.mvps.org/dmcritchie/excel....htm#hyperlink

=HYPERLINK("#"&CELL("address",'sheet two'!C5),'sheet two'!C5)

Perfectly transparent to insertion/deletion of rows/columns
will still point to the correct place (unless you delete the target).
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Peter" wrote in message ...
Hi

I have two problems with Excel. 1 I can't seem to create
any new hyperlinks (I don't know if this is how you call
it in English, I have a hungarian version). The
hyperlinks I try to create point to the right place but
don't take up the desired value. The old ones work fine
though. 2 How can I create a hyperlink to another excel
workbook's specified cell?

Thanks very much in advance,
Peter Baranya