![]() |
Printing
Is there a way I can create a Macro attached to a button, so when a
user clicks the button, it will automatically print the following ranges in order. Any help would be greatly appreciated. I am sure there is a simple code but I am having trouble figuring it out. Thanks Sheet 1 - Range A1:H42 Sheet 2 - Range A1:H40 Sheet 3 - Range A1:H39 Sheet 1 - Range I1:P42 Sheet 2 - Range I1:P40 Sheet 3 - Range I1:P39 |
Printing
insert the following code into the sheet1 module and also place a button onto
sheet1 named print1 Private Sub print1_click() Sheet1.Activate ActiveSheet.PageSetup.PrintArea = "$A$1:$h$42" Sheet1.PrintOut sheet2.Activate ActiveSheet.PageSetup.PrintArea = "$A$1:$h$40" sheet2.PrintOut sheet3.Activate ActiveSheet.PageSetup.PrintArea = "$A$1:$h$39" sheet3.PrintOut Sheet1.Activate ActiveSheet.PageSetup.PrintArea = "$i$1:$p$42" Sheet1.PrintOut sheet2.Activate ActiveSheet.PageSetup.PrintArea = "$i$1:$h$40" sheet2.PrintOut sheet3.Activate ActiveSheet.PageSetup.PrintArea = "$i$1:$h$39" sheet3.PrintOut 'return to default Sheet1.PageSetup.PrintArea = "" sheet2.PageSetup.PrintArea = "" sheet3.PageSetup.PrintArea = "" End Sub -- When you lose your mind, you free your life. "jdawg" wrote: Is there a way I can create a Macro attached to a button, so when a user clicks the button, it will automatically print the following ranges in order. Any help would be greatly appreciated. I am sure there is a simple code but I am having trouble figuring it out. Thanks Sheet 1 - Range A1:H42 Sheet 2 - Range A1:H40 Sheet 3 - Range A1:H39 Sheet 1 - Range I1:P42 Sheet 2 - Range I1:P40 Sheet 3 - Range I1:P39 |
Printing
You should be able to record that macro...unless you are talking about
printing the ranges all on one piece of paper/print job? Record a macro instructions: http://www.officearticles.com/excel/...soft_excel.htm ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "jdawg" wrote in message oups.com... Is there a way I can create a Macro attached to a button, so when a user clicks the button, it will automatically print the following ranges in order. Any help would be greatly appreciated. I am sure there is a simple code but I am having trouble figuring it out. Thanks Sheet 1 - Range A1:H42 Sheet 2 - Range A1:H40 Sheet 3 - Range A1:H39 Sheet 1 - Range I1:P42 Sheet 2 - Range I1:P40 Sheet 3 - Range I1:P39 |
All times are GMT +1. The time now is 11:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com