Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 516
Default How to create a macro to print a page?

How to create a macro to print a page? How do I creat a macro print different
pages? so I will not have to print the entire book?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 222
Default How to create a macro to print a page?

This macro will print the active sheet at the moment you run it:
=========
Sub PrintThisSheet()
ActiveSheet.PrintOut copies:=1
End Sub
=========
--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Matt" wrote:

How to create a macro to print a page? How do I creat a macro print different
pages? so I will not have to print the entire book?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 269
Default How to create a macro to print a page?

This will ask for a page range and print the specified range.

You could make a custom form to get both inputs at the same time and you
could also put in code to skip the print step if cancel is selected. This
will crash if both inputs are not given, but this is a quick and easy fix.

Sub Macro2()
x = Application.InputBox(prompt:="Start Page", Type:=1)
y = Application.InputBox(prompt:="End Page", Type:=1)

ActiveWindow.SelectedSheets.PrintOut From:=x, To:=y, Copies:=1
End Sub
--
If this helps, please remember to click yes.


"Matt" wrote:

How to create a macro to print a page? How do I creat a macro print different
pages? so I will not have to print the entire book?

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
Do I have to create a macro for print? foxcole Excel Discussion (Misc queries) 3 March 16th 09 05:44 PM
How to Create Macro to Increase Cell Value to one and Print Worksheet [email protected] Excel Worksheet Functions 4 July 24th 08 08:48 PM
Setting the print area in page set up to print 1 page wide by 2 pages tall EA[_2_] Excel Discussion (Misc queries) 2 July 12th 07 08:39 PM
How to create a macro which performs a copy-and-paste task every 5mins after data is refreshed from web page? ­»´ä®a©~¸Ë­× Excel Worksheet Functions 0 December 5th 06 08:57 AM
Create a print macro that would automatically select print area? wastedwings Excel Worksheet Functions 7 August 22nd 05 10:36 PM


All times are GMT +1. The time now is 02:03 AM.

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"