Results 1 to 4 of 4

Hyperlink to run VBA code using auto fill for =hyperlink

Threaded View

  1. #1
    Registered User
    Join Date
    05-17-2010
    Location
    Columbia, SC
    MS-Off Ver
    Excel 2003
    Posts
    8

    Hyperlink to run VBA code using auto fill for =hyperlink

    I am having a problem that has been KILLING me. I know how to create a hyperlink by right clicking on the cell>Hyperlink>"Place in This Documet">Type the cell reference>OK

    This is easy, but I have 600 of these to do. Auto fill for =hyperlink function is needed.

    I am wanting to reference the cell to itself and when the hyperlink in clicked excute using the following code:
    Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
    
    Dim cDwg As String
    Dim myCell As Excel.Range
    
    Set myCell = Target.Parent
    Debug.Print myCell.Address, myCell.Value
        'Name of hyperlink title in excel file
       If Target.Name = "Search Swift" Then
           
          <My code here>
           
        End If   
    End Sub
    I can link to the code above using the right click method and the code runs fine, but I can't get it to work using =hyperlink in the cell method.

    I tried using the following method and it does not link the code:

    =HYPERLINK("#"&CELL("address",Sheet1!F14),"Search Swift")

    Can this be done......what am I doing wrong?

    Any help would be appriciative.
    Last edited by Leith Ross; 05-17-2010 at 04:29 PM. Reason: Addde Code Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1