|
-
May 22nd, 2003, 12:16 PM
#1
Thread Starter
New Member
Command button for printing multi pages
I have a workbook that has about 20 sheets in it. I have a command button the the summary page that says "Print Qutoe"
What do I need to do so that when the button is pushed it will print only the pages that I want it to? (lets say sheet 2,4,8,12,17,&19) and not the others.
-
May 23rd, 2003, 12:33 AM
#2
Fanatic Member
The PrintOut method allows you to pass the beginning and ending pages that you want to print. From Excel help files:
PrintOut Method
Prints the object.
Syntax
expression.PrintOut(From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName)
expression Required. An expression that returns an object in the Applies To list.
From Optional Variant. The number of the page at which to start printing. If this argument is omitted, printing starts at the beginning.
To Optional Variant. The number of the last page to print. If this argument is omitted, printing ends with the last page.
-
May 23rd, 2003, 05:58 AM
#3
Thread Starter
New Member
Thank you for you reply, but I am not sure if I understand what you gave me or If I did explain what I needed to learn how to do??
Will what you gave me allow me to print out specified worksheets in an excel workbook?
And since I am VERY new to VP I am not really sure of how to make it work with a command button??
Please advise? Thanks!!
-
Oct 7th, 2004, 08:49 AM
#4
Hyperactive Member
I don't know if you still need help with this. But what you could do is hide all the sheets that you do not want to be printed, then just print out the workbook.
Example:
Sheets("sheet1").visible = false
Sheets("sheet3").visible = false
Application.Activeworkbook.printout
This will print out all the sheets that are visible.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|