|
-
Jan 24th, 2011, 10:32 PM
#3
Thread Starter
Junior Member
Re: Macro to create Hyperlink basing from cell address value
 Originally Posted by Help321
Hi
Try this:
vb Code:
Dim i As Integer
i = 4
For i = 4 To 10
Range("A" & i).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:="Sheet1!" & Range("A" & i).Text, TextToDisplay:=Range("A" & i).Text
Next i
That will start at cell A4, as you've already done A3 and finish at A10. Amend it as required for your real spreadsheet.
Cheers
Thanks a lot :-) This is what i really need. I tried to use the same concept but the one thing i couldn't do is how to implement it in ActiveSheet.Hyperlinks.Add method. I kind of confused what to put in "SubAddress" as i am getting an invalid link in my previous code.
Thank you so much again for the help :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|