Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 printing problem--printing 1 document on 2 pages | Excel Discussion (Misc queries) | |||
Excel Printing --Borders are not printing on the same page as data | Excel Discussion (Misc queries) | |||
Printing a heading on each new page when printing | Excel Discussion (Misc queries) | |||
Enable Double sided printing contiuously when printing multiple s. | Excel Discussion (Misc queries) | |||
Printing? Worksheets not printing the same on multiple pc's! | Excel Programming |