text string seach and count???

pbornemeier

Well-known Member
Joined
May 24, 2005
Messages
3,775
This code will generate a hyperlink to each folder listed in column A of the activesheet. Warning: it will first delete all hyperlinks on the active sheet.
Code:
Sub CreateColumnAHyperlinks()
    Dim lX As Long
    Dim lLastDataRow As Long
 
    For lX = ActiveSheet.Hyperlinks.Count To 1 Step -1
        ActiveSheet.Hyperlinks(lX).Delete
    Next
 
    lLastDataRow = Cells(Rows.Count, 1).End(xlUp).Row
 
    For lX = 2 To lLastDataRow
        ActiveSheet.Hyperlinks.Add Anchor:=Cells(lX, 1), Address:=Cells(lX, 1).Value, _
        TextToDisplay:=Cells(lX, 1).Value
    Next
End Sub
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Matthew Recknagel

New Member
Joined
Nov 2, 2011
Messages
13
Thanks for all your help! I really appreciate it! I will have to give your code a try here soon, (New assignment has come to me) and will give it a try afterwards! will let you know when i do.

Thanks again!
Matt
 

Watch MrExcel Video

Forum statistics

Threads
1,089,931
Messages
5,411,330
Members
403,362
Latest member
DoubleJay

This Week's Hot Topics

Top