AnsweredAssumed Answered

Making a hyperlink on VBA user form for opening documents

Question asked by Sam Pike on Jul 18, 2018
Latest reply on Jul 18, 2018 by 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 = "" 
  3. Call Shell("explorer.exe " & URL, vbNormalFocus) 

          End Sub