Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002
    Location
    London
    Posts
    73

    Unanswered: Exporting to Excel with Hyperlink

    Hi,

    I am using MS Access 2000 and have a problem when i export data from access to excel regarding hyperlinks. Once the data is in excel the hyperlink is not working, i have to click on each cell and press enter for the link to work.

    I have tried 2 ways

    which are :

    www.shaneel.com/image/GST7796.jpg
    =hyperlink"www.shaneel.com/image/GST7796.jpg")

    Is there a way where the link is already established once the date is exported into excel.

    Thank you in advance

  2. #2
    Join Date
    Jan 2002
    Location
    London
    Posts
    73
    Hi used this code and it works fine

    Dim lngRow As Long
    Dim intCol As Integer
    Dim ranCell As Range
    For lngRow = 13 To ActiveCell.SpecialCells(xlLastCell).Row
    For intCol = 5 To ActiveCell.SpecialCells(xlLastCell).Column
    Set ranCell = Cells(lngRow, intCol)
    If Left(ranCell, 7) = "http://" Then
    Call ActiveSheet.Hyperlinks.Add(Anchor:=ranCell, _
    Address:=ranCell, _
    TextToDisplay:="View Picture")
    End If
    Next intCol
    Next lngRow

Posting Permissions

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