Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print region 1

Status
Not open for further replies.

kingz2000

Programmer
May 28, 2002
304
DE
Hi,

I have a dynamically formed Excel sheet, whereby I don't really want all the pages to be printed, when one selects 'print'..
Is there anyway of setting defaults for the printing region..ie the page 'to' and 'from'???
Thanks in advance for any help.
 
Have a look at the From and To named parameters of the PrintOut method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I am not sure exactly what you are trying to do. If you know which pages to print this code snippet will work:

Dim iTo as Integer
Dim iFrom as Integer

iTo = [SetPage#]
iFrom = [SetPage#]

.SelectedSheets.Print
.SelectedSheets.PrintOut From:=iFrom, To:=iTo


The other way is to set the page range area on the fly and print it out.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top