Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-15-2017, 11:26 AM
aramaglia aramaglia is offline "Number must be between 100 and 400" error when printing Windows 7 64bit "Number must be between 100 and 400" error when printing Office 2016
Novice
"Number must be between 100 and 400" error when printing
 
Join Date: Jan 2017
Posts: 8
aramaglia is on a distinguished road
Talking "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
Reply With Quote
  #2  
Old 02-15-2017, 12:07 PM
Logit Logit is offline "Number must be between 100 and 400" error when printing Windows 10 "Number must be between 100 and 400" error when printing Office 2007
Expert
 
Join Date: Jan 2017
Posts: 533
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

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 ??
Reply With Quote
  #3  
Old 02-15-2017, 01:51 PM
aramaglia aramaglia is offline "Number must be between 100 and 400" error when printing Windows 7 64bit "Number must be between 100 and 400" error when printing Office 2016
Novice
"Number must be between 100 and 400" error when printing
 
Join Date: Jan 2017
Posts: 8
aramaglia is on a distinguished road
Default

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!
Reply With Quote
Reply



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
"Number must be between 100 and 400" error when printing 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
"Number must be between 100 and 400" error when printing 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

Other Forums: Access Forums

All times are GMT -7. The time now is 08:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft