Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Add Hyperlink

I would like VBA to insert hyperlink into cell A50 & below for every part
number contained in B1:Z1
..
When the hyperlinks are available in column A, users no longer need to
scroll through B1:Z1 in search of part numbers.

Ive tried recording macro for hyperlink but cant seem to understand how to
modify it. My modifications kept returning error, hence, needing your sample.

Thanks a lot

--
Edmund
(Using Excel XP)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Add Hyperlink


Hello Edmund,

Here is the macro to "bookmark" your parts on the worksheet. Change th
Worksheet name (its commented in the code) to whatever the name of you
worksheet is. The example assumes Sheet1.


Code
-------------------

Sub BookmarkParts()

Dim LinkCell As Range
Dim PartCell As Range
Dim Wks As Worksheet

'Put your worksheet name inside the quotes
Set Wks = Worksheets("Sheet1")

For Each PartCell In Wks.Range("B1:Z1")
I = I + 1
With Wks
Set LinkCell = .Cells(I, "A")
.Hyperlinks.Add Anchor:=LinkCell, Address:="", SubAddress:=PartCell.Address, TextToDisplay:=PartCell.Value
End With
Next PartCell

End Sub

-------------------


Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=55798

Reply
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
Can't make hyperlink function work for hyperlink to website Frank B Denman Excel Worksheet Functions 15 February 5th 07 11:01 PM
Moving rows with Hyperlink doesn't move hyperlink address Samad Excel Discussion (Misc queries) 15 June 22nd 06 12:03 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM
Macro to Copy Hyperlink to another file as a HYPERLINK, not text... dollardoc Excel Programming 1 April 7th 05 12:47 AM
reading html when hyperlink address not hyperlink text diplayed Kevin Excel Programming 1 December 4th 03 10:13 PM


All times are GMT +1. The time now is 11:16 AM.

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"