LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Uwe Uwe is offline
external usenet poster
 
Posts: 9
Default Hyperlinks in VBA

Hi there,
I have a problem with Excel 2002 VBA. I'm trying to insert a Hyperlink in a
Cell through VBA Programming. Here's a part of the code:

MyRange1 = "D" & Myrow
MyRange2 = "A" & Myrow
Range(MyRange1).Select
MyArtNr = Selection.Value
Range(MyRange2).Select
MyABNr = Selection.Value
MyJump = Chr(39) & MyArtNr & "-" & MyABNr & Chr(39) & "!A1"
Cells(Myrow, Mycol).Select

ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", _
SubAddress:=MyJump

It does everything right but when I click on the cell I get a error
"Reference is no valid". When I do the same thing with the Makrorecorder it
works. The only difference is that I want to set the SubAdress with a
variable (and then loop)

I hope somebody can help.
Thanks
 
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
Hyperlinks [email protected] Excel Discussion (Misc queries) 1 May 2nd 08 10:41 AM
Hyperlinks: Hyperlinks change on copy/paste? Rick S. Excel Worksheet Functions 0 November 13th 07 08:19 PM
Update 2000 Excel hyperlinks to 2003 hyperlinks lonv155 Excel Worksheet Functions 4 October 25th 07 05:51 AM
How toi turn-off hyperlinks [excel]? Email hyperlinks pop up ! jacob735 Excel Discussion (Misc queries) 1 June 22nd 07 12:57 AM
Excel Hyperlinks- cell content v. hyperlinks herpetafauna Excel Discussion (Misc queries) 2 May 23rd 06 04:39 AM


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