+ Reply to Thread
Results 1 to 4 of 4

Macro to print a selected range, not entire worksheet

  1. #1
    Registered User
    Join Date
    07-22-2004
    Posts
    89

    Macro to print a selected range, not entire worksheet

    Hello all,

    I have recorded a macro of the user selecting a range, then going File, Print, Selection, Ok.

    For some reason, the recorder collects the following line:
    Selection.PrintOut Copies:=1, Preview:=True, Collate:=True

    Running the macro results in my entire worksheet being printed

    Unless I am missing something, how can I tweak this line so that only my selection is sent to the printer?

    Thanx.

    - Jim

  2. #2
    Registered User
    Join Date
    09-15-2005
    Posts
    90
    You need to define your print range, if it is the same, re-record your macro and while recording select and set your print area.

  3. #3
    Dave Peterson
    Guest

    Re: Macro to print a selected range, not entire worksheet

    What do you have selected when you run the macro?



    James C wrote:
    >
    > Hello all,
    >
    > I have recorded a macro of the user selecting a range, then going File,
    > Print, Selection, Ok.
    >
    > For some reason, the recorder collects the following line:
    > Selection.PrintOut Copies:=1, Preview:=True, Collate:=True
    >
    > Running the macro results in my entire worksheet being printed
    >
    > Unless I am missing something, how can I tweak this line so that only
    > my selection is sent to the printer?
    >
    > Thanx.
    >
    > - Jim
    >
    > --
    > James C
    > ------------------------------------------------------------------------
    > James C's Profile: http://www.excelforum.com/member.php...o&userid=12114
    > View this thread: http://www.excelforum.com/showthread...hreadid=477618


    --

    Dave Peterson

  4. #4
    Registered User
    Join Date
    07-22-2004
    Posts
    89

    fixed!

    Guys,

    Thanks fot your feedback. I recorded a fresh session and it works fine. I had a print preview in the first recording that just screwed things up.

    I am all set.

    Thanks.

    - Jim

+ 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