title: Display text link to open specific PDF page from Excel
body: <p>I found a VBA code online that opens up an internal (shared drive) PDF document page in IE (e.g. goes to page 8 of PDF file). I would like to display text in the cell for a user to click (e.g. "Click here to view").</p>
  
  <p><strong>Problem</strong>: The cell currently displays '0' and I have to go to the function bar and hit [Enter] to execute.</p>
  
  <p><strong>Excel Version</strong>: 2003</p>
  
  <p><strong>Function call</strong>:</p>
  
  <pre><code>=GoToPDFpage("S:\...x_2011.pdf",8)
  </code></pre>
  
  <p><strong>VBA Code</strong>:</p>
  
  <pre><code>Function GoToPDFpage(Fname As String, pg As Integer)
  Set IE = CreateObject("InternetExplorer.Application")
  With IE
  .Navigate Fname &amp; "#page=" &amp; pg
  .Visible = True
  End With
  End Function
  </code></pre>
  
  <p>:EDIT:</p>
  
  <p>I was able to display text, but it's still not a link like I wanted.</p>
  
  <pre><code>="Click to view" &amp; GoToPDFpage("S:\...x_2011.pdf",8)
  </code></pre>
  
  <p>Thank you for your help.</p>