#1
|
|||
|
|||
"Number must be between 100 and 400" error when printing
Hello,
I have this script that works great, and it prints out a sheet just like it is supposed to. However sometimes there is an error that pops up stating that "The number must be between 10 and 400". It was harmless as everything worked, but now I am trying to expand the script to print multiple pages, and I do not want the user to have to clear this error when it pops up. I have had no luck finding any helpful solutions so far, and I am wondering if anyone else has had this issue? For reference, Code:
Application.PrintCommunication = False With ws8.PageSetup .PrintArea = "$A$1:$K$" & CommLR + 22 - 1 & "" .LeftHeader = "" .CenterHeader = "&""Arial,bold""&28" & Header .RightHeader = "" .LeftFooter = "" .CenterFooter = "" .RightFooter = "" .LeftMargin = Application.InchesToPoints(0.39) .RightMargin = Application.InchesToPoints(0.39) .TopMargin = Application.InchesToPoints(0.5) .BottomMargin = Application.InchesToPoints(0.5) .HeaderMargin = Application.InchesToPoints(0) .FooterMargin = Application.InchesToPoints(0) .PrintHeadings = False .PrintGridlines = False .PrintComments = xlPrintSheetEnd .PrintQuality = 600 .CenterHorizontally = True .CenterVertically = True .Orientation = xlLandscape .Draft = False .PaperSize = xlPaperLetter .FirstPageNumber = xlAutomatic .Order = xlDownThenOver .BlackAndWhite = False .Zoom = 58 End With ws8.Range("A1:P" & CommLR + 22 - 1).PrintOut |
#2
|
|||
|
|||
This part of your code:
With ws8.PageSetup .PrintArea = "$A$1:$K$" Doesn't correspond with this part : ws8.Range("A1:P" & Probably not a big deal but ?? |
#3
|
|||
|
|||
Yea that appears to be a misprint, as I have another script that where they are the same and that error occurs. Thanks for catching that though!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I keep getting an error when downloading email "An unknown error has occurred. 0x8004060" | dbassman | Outlook | 0 | 07-15-2016 04:15 PM |
Word Template - Userform launch from QAT giving error "Wrong number of Arguments" | dan88 | Word | 6 | 05-17-2016 10:03 AM |
Spreadsheet with "CR" & "DB" in amount & number columns. | bfisher | Excel | 4 | 09-28-2015 07:03 AM |
Error: "Changes made were lost...reconnect with server", when switching "from" field | randhurrle | Outlook | 2 | 02-25-2015 06:51 PM |
Mailing: how to make the "page number" in Word is the same as "row number" in excel w | Jamal NUMAN | Word | 1 | 09-03-2011 11:37 AM |