#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 221
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 printing problem--printing 1 document on 2 pages Bons Excel Discussion (Misc queries) 0 December 24th 09 04:15 PM
Excel Printing --Borders are not printing on the same page as data Stup88 Excel Discussion (Misc queries) 1 August 7th 07 09:34 AM
Printing a heading on each new page when printing Brian Excel Discussion (Misc queries) 3 November 15th 06 05:22 PM
Enable Double sided printing contiuously when printing multiple s. Lee Excel Discussion (Misc queries) 1 November 27th 04 01:58 AM
Printing? Worksheets not printing the same on multiple pc's! 43fan Excel Programming 2 April 29th 04 02:34 PM


All times are GMT +1. The time now is 02:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"