Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Print (excel 2003)

    Hi all,

    I'm trying to print using a command button control from a form. On the line Papersize. It bugs out, run time error 1004. "Unable to set papersize pagesetup class"

    Could some one point me in the right direction

    Thanks,
    Darryl.

    Option Explicit

    Private Sub CommandButton1_Click()
    Sheets("DAYS").Columns("B:C").EntireColumn.Hidden = True
    Application.ActivePrinter = "vpc-appsVPC_PressRm_KM-C8026N on Ne05:"
    If Me.chkdays.Value = True Then
    With ThisWorkbook.Sheets("days")
    With .PageSetup
    .Orientation = xlLandscape
    .PaperSize = xlPaperLedger
    .FitToPagesWide = 1
    .FitToPagesTall = 1
    .PrintArea = "$A$1:$BE$36"
    ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate:=True
    .PrintArea = "$A$37:$BE$60"
    ActiveWindow.SelectedSheets.PrintOut From:=2, To:=2, Copies:=1, Collate:=True
    End With
    End With
    End If
    End sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Print (excel 2003)

    Your printer probably can't handle Ledger size (17" x 11").

Posting Permissions

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