title: How to get VBA hyperlinks working?
body: <p>I tried to use hyperlinks but it is not doing anything at all. I would like to know what I need to change to use hyperlinks please.</p>
  
  <pre><code>Sub RDB_Worksheet_To_PDF()
      Dim FileName As String
      Dim PONumber As String
      Dim FolderPath As String
  
      PONumber = Sheets("Purchase Order with Sales Tax").Cells(8, 6).Value
      FolderPath = "Z:\1.PRODUCTION\1. PURCHASING\PO H 2012\"
  
      If ActiveWindow.SelectedSheets.Count &gt; 1 Then
          MsgBox "There is more then one sheet selected," &amp; vbNewLine &amp; _
                 "be aware that every selected sheet will be published"
      End If
  
      'Call the function with the correct arguments
      FileName = RDB_Create_PDF(ActiveSheet, FolderPath &amp; PONumber, True, True)
  
      If FileName &lt;&gt; FolderPath &amp; PONumber Then
          'Ok, you find the PDF where you saved it
          'You can call the mail macro here if you want
          MsgBox "Sweet! The PO has been saved as a PDF." &amp; vbNewLine &amp; _
                 "Click on the PO Number in the PO Number WorkSheet to view."
      Else
          MsgBox "Not possible to create the PDF, possible reasons:" &amp; vbNewLine &amp; _
                 "Microsoft Add-in is not installed" &amp; vbNewLine &amp; _
                 "There is no PO number selected" &amp; vbNewLine &amp; _
                 "The path to Save the file in is not correct" &amp; vbNewLine &amp; _
                 "You didn't want to overwrite the existing PDF if it exist"
      End If
  
  
      Sheets("PO Number").Select
      Range("A1").Select
  
  
      Set smvar = Cells.Find(What:=PONumber, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
          :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
          False, SearchFormat:=False)
         If Not smvar Is Nothing Then smvar.Activate
  
          ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
              FolderPath &amp; PONumber &amp; ".pdf"
          Sheets("Purchase Order with Sales Tax").Select
  
  
  End Sub
  </code></pre>