+ Reply to Thread
Results 1 to 3 of 3

Print Area:What would be the code for setting the print area

  1. #1
    Registered User
    Join Date
    07-29-2004
    Posts
    4

    Print Area:What would be the code for setting the print area

    What would be the code for setting the print area equal to the currently selected range on a sheet (i.e. not just e.g. "a1:d4", but something that changes?
    Last edited by wammer; 09-01-2005 at 07:23 PM.

  2. #2
    George Nicholson
    Guest

    re: Print Area:What would be the code for setting the print area

    Per the (verbatim) example in VBA help:
    ActiveSheet.PageSetup.PrintArea = ActiveCell.CurrentRegion.Address

    --
    George Nicholson

    Remove 'Junk' from return address.


    "wammer" <[email protected]> wrote in
    message news:[email protected]...
    >
    > What would be the code for setting the print area equal to the currently
    > selected range on a sheet (i.e. not just e.g. "a1:d4", but something
    > that changes?
    >
    >
    > --
    > wammer
    > ------------------------------------------------------------------------
    > wammer's Profile:
    > http://www.excelforum.com/member.php...o&userid=12452
    > View this thread: http://www.excelforum.com/showthread...hreadid=401350
    >




  3. #3
    Dave Peterson
    Guest

    re: Print Area:What would be the code for setting the print area

    Instead of fiddling with the printrange, maybe just printing the selection would
    be enough:

    selection.printout

    (may not apply to what you really want to do, though.)

    wammer wrote:
    >
    > What would be the code for setting the print area equal to the currently
    > selected range on a sheet (i.e. not just e.g. "a1:d4", but something
    > that changes?
    >
    > --
    > wammer
    > ------------------------------------------------------------------------
    > wammer's Profile: http://www.excelforum.com/member.php...o&userid=12452
    > View this thread: http://www.excelforum.com/showthread...hreadid=401350


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1