ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can I link to a print command from a cell? (https://www.excelbanter.com/excel-programming/384755-can-i-link-print-command-cell.html)

tcloud@lcc[_2_]

Can I link to a print command from a cell?
 
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?

Vergel Adriano

Can I link to a print command from a cell?
 
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



"tcloud@lcc" wrote:

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?



All times are GMT +1. The time now is 04:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com