Can I link to a print command from a cell?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a spreadsheet in which I have incorporated hyperlinks to access other
pages and cells. Is it possible to program a hyperlinked cell to cause a
particular worksheet to print without having to go to the print command on
the menu bar?
 
Yes, put your code in the FollowHyperlink event of the worksheet. For
example, this will print the active sheet if the hyperlink in A1 is clicked.

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Address = "$A$1" Then ActiveSheet.PrintOut
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top