Consulting

Results 1 to 4 of 4

Thread: setting Print Area

  1. #1
    VBAX Contributor
    Joined
    May 2007
    Posts
    128
    Location

    setting Print Area

    Dear Experts

    How to assign Print range
    from range("c3") to range("P" & .Rows.Count).End(xlUp).Row

    I want to print from c3 to last used row of Column P

    Please help

  2. #2
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Hi,

    [vba] With ActiveSheet 'or whatever sheet reference you want
    .PageSetup.PrintArea = .Range("c3", .Cells(.Rows.Count, "P").End(xlUp)).Address
    End With[/vba]
    Matt

  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,088
    Location
    You could also to this site and review their method.

    http://www.dailydoseofexcel.com/arch...area-with-vba/

    (Sorry Matt, didn't mean to steal your thunder on this one)
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  4. #4
    Knowledge Base Approver
    The King of Overkill! VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Never a problem, I'm not territorial (or have much thunder to steal anyways )
    Matt

Posting Permissions

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