Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Error 1004 for PaperSize Property

  1. #1
    New Member
    Join Date
    Sep 2007
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Error 1004 for PaperSize Property

    I have a short piece of vba that includes

    With ActiveSheet.PageSetup
    .
    .
    .
    .PaperSize = xlPaper11x17
    .
    .
    .
    End With

    It ran a few times when I was debuging but then I closed the vba editor and ran if from a toolbar button and I get

    Error 1004 Unable to set the PaperSize Property of the PageSetup Class

    It's done this ever since. If I comment out the .PaperSize = xlPaper11x17 it works fine.

    The default printer is a big copier that handels A, B and legal paper and there are several other printers installed including pdf printers so it's not like it can't be printed on installed hardware.

    Any ideas?

    Thanks,

    C DeWitt

  2. #2
    Board Regular
    Join Date
    Aug 2011
    Posts
    2,932
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Error 1004 for PaperSize Property

    Hi,

    I'm not sure - but what happens if you replace ActiveSheet with the name of the sheet i.e. Sheets("Sheet1")?

  3. #3
    New Member
    Join Date
    Sep 2007
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Error 1004 for PaperSize Property

    How odd, I changed it to use the sheet name and it works. So why did it decide to pick on sheet size and not the rest?

    It's a mystery!

    Thank you for the suggestion

    C DeWitt

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •