2 Replies Latest reply on Jul 18, 2018 5:45 PM by Sam Pike

    Making a hyperlink on VBA user form for opening documents

    Sam Pike

      I am trying to make a label on my form be a hyperlink to open a Microsoft Doc, Excel Spreadsheet, .PDF or a Power Point file or whatever that is stored on a network drive in a certain location.

      I have found code that is similar and that opens a certain webpage, but I cannot get it to work or look on my network drives. I replaced the URL down below with Example:"O:\\Form\NewFolder\trialdocument.doc/"

      Is there any Reference Add-ins I would need to have turned on?

       

                     Private Sub Url_Click() 

      1. Dim URL As String 
      2. URL = "http://www.gupta9665.com/" 
      3. Call Shell("explorer.exe " & URL, vbNormalFocus) 

                End Sub