+ Reply to Thread
Results 1 to 2 of 2

hyperlink question

Hybrid View

  1. #1
    Registered User
    Join Date
    03-30-2006
    Posts
    7

    hyperlink question

    I am modifying an old vb6 program which creates an Excel spreadsheet. I have added hyperlinks to a column. When I run the program in the IDE and click on the resulting hyperlinks they open in a new window but when I access the spreadsheet via our intranet and click on the hyperlinks they do open, but not in a new window.

    The intranet is hosted on a different server than that which the spreadsheet is save on.

    Can anyone suggest how I can set this up so that my users can click on the hyperlinks and get a new window?

    Thank you.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523

    Macro to run when hyperlinks selected

    There is a way to run macros from Hyperlinks is this what you are asking to do because, I am not sure about your question about new windows, if this is what you want then,here is a code for that


    Hit Ctrl k to get to hyperlinks
    in text to display enter Macro1
    in cell reference enter a cell reference
    repeat

    This goes in the worksheet module
    Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
        Select Case Target.TextToDisplay
        Case "Macro1"
            Macro1
        Case "Macro2"
            Macro2
        Case "Macro3"
            Macro3
        Case "Macro4"
            Macro4
        End Select
    End Sub
    This goes into a regular module
    Sub Macro1()
        MsgBox "Macro1"
    End Sub
    Sub Macro2()
        MsgBox "Macro2"
    End Sub
    Sub Macro3()
        MsgBox "Macro3"
    End Sub
    Sub Macro4()
        MsgBox "Macro4"
    End Sub

+ Reply to Thread

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