|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
I have a large spreadsheet that I would like to be printed on three 11x17 pages: Page1: A1:AF52 Page2: A53:AF110 Page3: AI53:BJ110
This works OK except we also get a blank 4th sheet to print for AI1:AF52 which is directly above Page3 and has no data in it. Is there a way to set the print feature up to only print the areas that we want. I've tried setting a print area, but it seems to only allow 1 print area at a time???
Thanks for any help you can give.
Patti
-- Patti
|
|
Patti, how about using a macro to do your printing, like this
Sub Print_Ranges()
ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$52" ActiveSheet.PrintOut Copies:=1
ActiveSheet.PageSetup.PrintArea = "$A$53:$AF$110" ActiveSheet.PrintOut Copies:=1
ActiveSheet.PageSetup.PrintArea = "$AI$53:$BJ$110" ActiveSheet.PrintOut Copies:=1
ActiveSheet.PageSetup.PrintArea = ""
End Sub
-- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003
"PattiP" <PattiP[ at ]discussions.microsoft.com> wrote in message news:13B4BBA8-6AAE-4F26-8E4E-EE4E6F391A76[ at ]microsoft.com...
[Quoted Text] >I have a large spreadsheet that I would like to be printed on three 11x17 > pages: > Page1: A1:AF52 > Page2: A53:AF110 > Page3: AI53:BJ110 > > This works OK except we also get a blank 4th sheet to print for AI1:AF52 > which is directly above Page3 and has no data in it. Is there a way to > set > the print feature up to only print the areas that we want. I've tried > setting a print area, but it seems to only allow 1 print area at a time??? > > Thanks for any help you can give. > > Patti > > > > -- > Patti
|
|
Thanks, Paul. That worked great.
A couple more questions:
1) I want this particular report to print to another printer other than my default printer. Is there a way to direct it automatically?
2) Is there a way to give the user an option to printer any one of the 3 pages or all three? I'm assuming I'd have to have more code written at the beginning to have a dialog pop up asking the user to select a page option (or "enter" for all) and then use some IF() statements based on the option they selected?? I'm a little rusty on my VB but its slowly coming back!!! Thanks!!
Patti -- Patti
"Paul B" wrote:
[Quoted Text] > Patti, how about using a macro to do your printing, like this > > Sub Print_Ranges() > > ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$52" > ActiveSheet.PrintOut Copies:=1 > > ActiveSheet.PageSetup.PrintArea = "$A$53:$AF$110" > ActiveSheet.PrintOut Copies:=1 > > ActiveSheet.PageSetup.PrintArea = "$AI$53:$BJ$110" > ActiveSheet.PrintOut Copies:=1 > > ActiveSheet.PageSetup.PrintArea = "" > > End Sub > > -- > Paul B > Always backup your data before trying something new > Please post any response to the newsgroups so others can benefit from it > Feedback on answers is always appreciated! > Using Excel 2002 & 2003 > > "PattiP" <PattiP[ at ]discussions.microsoft.com> wrote in message > news:13B4BBA8-6AAE-4F26-8E4E-EE4E6F391A76[ at ]microsoft.com... > >I have a large spreadsheet that I would like to be printed on three 11x17 > > pages: > > Page1: A1:AF52 > > Page2: A53:AF110 > > Page3: AI53:BJ110 > > > > This works OK except we also get a blank 4th sheet to print for AI1:AF52 > > which is directly above Page3 and has no data in it. Is there a way to > > set > > the print feature up to only print the areas that we want. I've tried > > setting a print area, but it seems to only allow 1 print area at a time??? > > > > Thanks for any help you can give. > > > > Patti > > > > > > > > -- > > Patti > > >
|
|
Patti, here is some code to try, You can record a macro to set the printer, print a sheet, and then change the printer back to your default printer, copy that code and add to this, just replace the lines, ActiveSheet.PrintOut Copies:=1, with the code you recorded and see if that will work. You can also bring up the print dialog box to pick a printer like this Application.Dialogs(xlDialogPrint).Show
Sub Print_Pages() 'Will bring up an input box to select the page(s) 'that up want to print Dim Ans As Variant
Ans = InputBox(prompt:="1 = Page 1, Range A1:AF52" & _ vbLf & "2 = Page 2, Range A53:Af110" & _ vbLf & "3 = Page 3, Range AI:BJ110" & _ vbLf & "4 = All Three Pages", Title:="Enter A Number To Print" _ , Default:=1) 'You can change what comes up as the default here
Select Case Trim(Ans) Case Is = "1" ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$52" ActiveSheet.PrintOut Copies:=1 ActiveSheet.PageSetup.PrintArea = ""
Case Is = "2" ActiveSheet.PageSetup.PrintArea = "$A$53:$AF$110" ActiveSheet.PrintOut Copies:=1 ActiveSheet.PageSetup.PrintArea = ""
Case Is = "3" ActiveSheet.PageSetup.PrintArea = "$AI$53:$BJ$110" ActiveSheet.PrintOut Copies:=1 ActiveSheet.PageSetup.PrintArea = ""
Case Is = "4" ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$52" ActiveSheet.PrintOut Copies:=1
ActiveSheet.PageSetup.PrintArea = "$A$53:$AF$110" ActiveSheet.PrintOut Copies:=1
ActiveSheet.PageSetup.PrintArea = "$AI$53:$BJ$110" ActiveSheet.PrintOut Copies:=1
ActiveSheet.PageSetup.PrintArea = "" Case Else MsgBox "You Must Enter A Number Between 1 & 4" Exit Sub End Select
End Sub
-- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003
"PattiP" <PattiP[ at ]discussions.microsoft.com> wrote in message news:65E41D7F-6D59-4E47-8F75-60815DCBB563[ at ]microsoft.com...
[Quoted Text] > Thanks, Paul. That worked great. > > A couple more questions: > > 1) I want this particular report to print to another printer other than my > default printer. Is there a way to direct it automatically? > > 2) Is there a way to give the user an option to printer any one of the 3 > pages or all three? I'm assuming I'd have to have more code written at > the > beginning to have a dialog pop up asking the user to select a page option > (or > "enter" for all) and then use some IF() statements based on the option > they > selected?? I'm a little rusty on my VB but its slowly coming back!!! > Thanks!! > > Patti > -- > Patti > > > "Paul B" wrote: > >> Patti, how about using a macro to do your printing, like this >> >> Sub Print_Ranges() >> >> ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$52" >> ActiveSheet.PrintOut Copies:=1 >> >> ActiveSheet.PageSetup.PrintArea = "$A$53:$AF$110" >> ActiveSheet.PrintOut Copies:=1 >> >> ActiveSheet.PageSetup.PrintArea = "$AI$53:$BJ$110" >> ActiveSheet.PrintOut Copies:=1 >> >> ActiveSheet.PageSetup.PrintArea = "" >> >> End Sub >> >> -- >> Paul B >> Always backup your data before trying something new >> Please post any response to the newsgroups so others can benefit from it >> Feedback on answers is always appreciated! >> Using Excel 2002 & 2003 >> >> "PattiP" <PattiP[ at ]discussions.microsoft.com> wrote in message >> news:13B4BBA8-6AAE-4F26-8E4E-EE4E6F391A76[ at ]microsoft.com... >> >I have a large spreadsheet that I would like to be printed on three >> >11x17 >> > pages: >> > Page1: A1:AF52 >> > Page2: A53:AF110 >> > Page3: AI53:BJ110 >> > >> > This works OK except we also get a blank 4th sheet to print for >> > AI1:AF52 >> > which is directly above Page3 and has no data in it. Is there a way to >> > set >> > the print feature up to only print the areas that we want. I've tried >> > setting a print area, but it seems to only allow 1 print area at a >> > time??? >> > >> > Thanks for any help you can give. >> > >> > Patti >> > >> > >> > >> > -- >> > Patti >> >> >>
|
|
Oh yeah, I was thinking "select case" when I was referring to IF() statement, but couldn't remember what it was called. LOL! This helps immensely. THANK YOU!
It never ceases to amaze me the help and prompt replies I get from all of you. Thank you, thank you, thank you!!!! -- Patti
"Paul B" wrote:
[Quoted Text] > Patti, here is some code to try, You can record a macro to set the printer, > print a sheet, and then change the printer back to your default printer, > copy that code and add to this, just replace the lines, ActiveSheet.PrintOut > Copies:=1, with the code you recorded and see if that will work. You can > also bring up the print dialog box to pick a printer like this > Application.Dialogs(xlDialogPrint).Show > > > > Sub Print_Pages() > 'Will bring up an input box to select the page(s) > 'that up want to print > Dim Ans As Variant > > Ans = InputBox(prompt:="1 = Page 1, Range A1:AF52" & _ > vbLf & "2 = Page 2, Range A53:Af110" & _ > vbLf & "3 = Page 3, Range AI:BJ110" & _ > vbLf & "4 = All Three Pages", Title:="Enter A Number To Print" > _ > , Default:=1) 'You can change what comes up as the default > here > > Select Case Trim(Ans) > Case Is = "1" > ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$52" > ActiveSheet.PrintOut Copies:=1 > ActiveSheet.PageSetup.PrintArea = "" > > > Case Is = "2" > ActiveSheet.PageSetup.PrintArea = "$A$53:$AF$110" > ActiveSheet.PrintOut Copies:=1 > ActiveSheet.PageSetup.PrintArea = "" > > > Case Is = "3" > ActiveSheet.PageSetup.PrintArea = "$AI$53:$BJ$110" > ActiveSheet.PrintOut Copies:=1 > ActiveSheet.PageSetup.PrintArea = "" > > > Case Is = "4" > ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$52" > ActiveSheet.PrintOut Copies:=1 > > > ActiveSheet.PageSetup.PrintArea = "$A$53:$AF$110" > ActiveSheet.PrintOut Copies:=1 > > > ActiveSheet.PageSetup.PrintArea = "$AI$53:$BJ$110" > ActiveSheet.PrintOut Copies:=1 > > > ActiveSheet.PageSetup.PrintArea = "" > Case Else > MsgBox "You Must Enter A Number Between 1 & 4" > Exit Sub > End Select > > End Sub > > -- > Paul B > Always backup your data before trying something new > Please post any response to the newsgroups so others can benefit from it > Feedback on answers is always appreciated! > Using Excel 2002 & 2003 > > "PattiP" <PattiP[ at ]discussions.microsoft.com> wrote in message > news:65E41D7F-6D59-4E47-8F75-60815DCBB563[ at ]microsoft.com... > > Thanks, Paul. That worked great. > > > > A couple more questions: > > > > 1) I want this particular report to print to another printer other than my > > default printer. Is there a way to direct it automatically? > > > > 2) Is there a way to give the user an option to printer any one of the 3 > > pages or all three? I'm assuming I'd have to have more code written at > > the > > beginning to have a dialog pop up asking the user to select a page option > > (or > > "enter" for all) and then use some IF() statements based on the option > > they > > selected?? I'm a little rusty on my VB but its slowly coming back!!! > > Thanks!! > > > > Patti > > -- > > Patti > > > > > > "Paul B" wrote: > > > >> Patti, how about using a macro to do your printing, like this > >> > >> Sub Print_Ranges() > >> > >> ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$52" > >> ActiveSheet.PrintOut Copies:=1 > >> > >> ActiveSheet.PageSetup.PrintArea = "$A$53:$AF$110" > >> ActiveSheet.PrintOut Copies:=1 > >> > >> ActiveSheet.PageSetup.PrintArea = "$AI$53:$BJ$110" > >> ActiveSheet.PrintOut Copies:=1 > >> > >> ActiveSheet.PageSetup.PrintArea = "" > >> > >> End Sub > >> > >> -- > >> Paul B > >> Always backup your data before trying something new > >> Please post any response to the newsgroups so others can benefit from it > >> Feedback on answers is always appreciated! > >> Using Excel 2002 & 2003 > >> > >> "PattiP" <PattiP[ at ]discussions.microsoft.com> wrote in message > >> news:13B4BBA8-6AAE-4F26-8E4E-EE4E6F391A76[ at ]microsoft.com... > >> >I have a large spreadsheet that I would like to be printed on three > >> >11x17 > >> > pages: > >> > Page1: A1:AF52 > >> > Page2: A53:AF110 > >> > Page3: AI53:BJ110 > >> > > >> > This works OK except we also get a blank 4th sheet to print for > >> > AI1:AF52 > >> > which is directly above Page3 and has no data in it. Is there a way to > >> > set > >> > the print feature up to only print the areas that we want. I've tried > >> > setting a print area, but it seems to only allow 1 print area at a > >> > time??? > >> > > >> > Thanks for any help you can give. > >> > > >> > Patti > >> > > >> > > >> > > >> > -- > >> > Patti > >> > >> > >> > > >
|
|
Your welcome, hope it works out for you -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003
"PattiP" <PattiP[ at ]discussions.microsoft.com> wrote in message news:EF763145-117A-483A-B12D-7608F923D990[ at ]microsoft.com...
[Quoted Text] > Oh yeah, I was thinking "select case" when I was referring to IF() > statement, > but couldn't remember what it was called. LOL! This helps immensely. > THANK > YOU! > > It never ceases to amaze me the help and prompt replies I get from all of > you. > Thank you, thank you, thank you!!!! > -- > Patti > > > "Paul B" wrote: > >> Patti, here is some code to try, You can record a macro to set the >> printer, >> print a sheet, and then change the printer back to your default printer, >> copy that code and add to this, just replace the lines, >> ActiveSheet.PrintOut >> Copies:=1, with the code you recorded and see if that will work. You can >> also bring up the print dialog box to pick a printer like this >> Application.Dialogs(xlDialogPrint).Show >> >> >> >> Sub Print_Pages() >> 'Will bring up an input box to select the page(s) >> 'that up want to print >> Dim Ans As Variant >> >> Ans = InputBox(prompt:="1 = Page 1, Range A1:AF52" & _ >> vbLf & "2 = Page 2, Range A53:Af110" & _ >> vbLf & "3 = Page 3, Range AI:BJ110" & _ >> vbLf & "4 = All Three Pages", Title:="Enter A Number To >> Print" >> _ >> , Default:=1) 'You can change what comes up as the default >> here >> >> Select Case Trim(Ans) >> Case Is = "1" >> ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$52" >> ActiveSheet.PrintOut Copies:=1 >> ActiveSheet.PageSetup.PrintArea = "" >> >> >> Case Is = "2" >> ActiveSheet.PageSetup.PrintArea = "$A$53:$AF$110" >> ActiveSheet.PrintOut Copies:=1 >> ActiveSheet.PageSetup.PrintArea = "" >> >> >> Case Is = "3" >> ActiveSheet.PageSetup.PrintArea = "$AI$53:$BJ$110" >> ActiveSheet.PrintOut Copies:=1 >> ActiveSheet.PageSetup.PrintArea = "" >> >> >> Case Is = "4" >> ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$52" >> ActiveSheet.PrintOut Copies:=1 >> >> >> ActiveSheet.PageSetup.PrintArea = "$A$53:$AF$110" >> ActiveSheet.PrintOut Copies:=1 >> >> >> ActiveSheet.PageSetup.PrintArea = "$AI$53:$BJ$110" >> ActiveSheet.PrintOut Copies:=1 >> >> >> ActiveSheet.PageSetup.PrintArea = "" >> Case Else >> MsgBox "You Must Enter A Number Between 1 & 4" >> Exit Sub >> End Select >> >> End Sub >> >> -- >> Paul B >> Always backup your data before trying something new >> Please post any response to the newsgroups so others can benefit from it >> Feedback on answers is always appreciated! >> Using Excel 2002 & 2003 >> >> "PattiP" <PattiP[ at ]discussions.microsoft.com> wrote in message >> news:65E41D7F-6D59-4E47-8F75-60815DCBB563[ at ]microsoft.com... >> > Thanks, Paul. That worked great. >> > >> > A couple more questions: >> > >> > 1) I want this particular report to print to another printer other than >> > my >> > default printer. Is there a way to direct it automatically? >> > >> > 2) Is there a way to give the user an option to printer any one of the >> > 3 >> > pages or all three? I'm assuming I'd have to have more code written at >> > the >> > beginning to have a dialog pop up asking the user to select a page >> > option >> > (or >> > "enter" for all) and then use some IF() statements based on the option >> > they >> > selected?? I'm a little rusty on my VB but its slowly coming back!!! >> > Thanks!! >> > >> > Patti >> > -- >> > Patti >> > >> > >> > "Paul B" wrote: >> > >> >> Patti, how about using a macro to do your printing, like this >> >> >> >> Sub Print_Ranges() >> >> >> >> ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$52" >> >> ActiveSheet.PrintOut Copies:=1 >> >> >> >> ActiveSheet.PageSetup.PrintArea = "$A$53:$AF$110" >> >> ActiveSheet.PrintOut Copies:=1 >> >> >> >> ActiveSheet.PageSetup.PrintArea = "$AI$53:$BJ$110" >> >> ActiveSheet.PrintOut Copies:=1 >> >> >> >> ActiveSheet.PageSetup.PrintArea = "" >> >> >> >> End Sub >> >> >> >> -- >> >> Paul B >> >> Always backup your data before trying something new >> >> Please post any response to the newsgroups so others can benefit from >> >> it >> >> Feedback on answers is always appreciated! >> >> Using Excel 2002 & 2003 >> >> >> >> "PattiP" <PattiP[ at ]discussions.microsoft.com> wrote in message >> >> news:13B4BBA8-6AAE-4F26-8E4E-EE4E6F391A76[ at ]microsoft.com... >> >> >I have a large spreadsheet that I would like to be printed on three >> >> >11x17 >> >> > pages: >> >> > Page1: A1:AF52 >> >> > Page2: A53:AF110 >> >> > Page3: AI53:BJ110 >> >> > >> >> > This works OK except we also get a blank 4th sheet to print for >> >> > AI1:AF52 >> >> > which is directly above Page3 and has no data in it. Is there a way >> >> > to >> >> > set >> >> > the print feature up to only print the areas that we want. I've >> >> > tried >> >> > setting a print area, but it seems to only allow 1 print area at a >> >> > time??? >> >> > >> >> > Thanks for any help you can give. >> >> > >> >> > Patti >> >> > >> >> > >> >> > >> >> > -- >> >> > Patti >> >> >> >> >> >> >> >> >>
|
|
|