Consulting

Results 1 to 3 of 3

Thread: Solved: Hyperlink as cell text in a range

  1. #1

    Solved: Hyperlink as cell text in a range

    With Range("Play")
        .Locked = True
        .Hyperlinks.Add Anchor:=Cel, Address:=Cel.Text
    End With
    Range play contains http:// adresses to calls, however these appear as text rather than a link im trying to convert them back to a link. I had this code previously which works a treat but now I need to do it based on the named range play ?

    Sub Hyperlink
    'Settings
    Dim lastrow As Long
    lastrow = Cells(Rows.Count, "A").End(xlUp).Row 
    ' ( - ("A") This select the column to look at to ascertain the last row of data)
    
    'Links 
    Dim Cel As Range
    For Each Cel In Intersect(Range("R3:R" & lastrow), ActiveSheet.UsedRange)
    ' (This selects the column to look at to make a cell into a link , ("R3:R" & lastrow) only change R3:R , "R3 'is the start position and R"&lastrow is end position.
    ActiveSheet.Hyperlinks.Add Anchor:=Cel, Address:=Cel.Text
    Next
    End sub 
    

    Last edited by khalid79m; 11-28-2008 at 07:00 AM.

  2. #2
    Moderator VBAX Master georgiboy's Avatar
    Joined
    Mar 2008
    Location
    Kent, England
    Posts
    1,198
    Location
    For Each Cel In Range("Play").Cells
    Click here for a guide on how to add code tags
    Click here for a guide on how to mark a thread as solved
    Click here for a guide on how to upload a file with your post

    Excel 365, Version 2403, Build 17425.20146

  3. #3
    perfect ..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •