+ Reply to Thread
Results 1 to 4 of 4

VBA to set print range, open box asking for print qty, print, then redefine print area

  1. #1
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    846

    VBA to set print range, open box asking for print qty, print, then redefine print area

    Good morning happy campers,

    I come asking for help an interesting project at work.
    Sheet (attached) has sample info in A:A, B:B contains formula of what i want to see printed.
    Command button (currently empty)
    I would like to be able to click the command button (print area set as B1)
    An input box open asking me to confirm print qty, then prints after clicking ok
    once this has been sent to printer i would then like the code to move the print range down by one cell each time i click the button.

    In reality the data in A:A will be around 400-500 entries, and i need to have the formula in B:B as the data will be copy/pasted into A:A from a much bigger file.

    The print options and page margins i can get round (not set to A4) but would love some help on the above

    Kind regards, galvinpaddy
    Attached Files Attached Files

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    See attachment

    Try this. See attachment
    Attached Files Attached Files
    David
    (*) Reputation points appreciated.

  3. #3
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    846

    Re: VBA to set print range, open box asking for print qty, print, then redefine print area

    Hi, many thanks for that.
    When i click print it appears to remove the print area already set, and then does not reset the print area to the next cell once it selects it.

    Kind Regards.

  4. #4
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: VBA to set print range, open box asking for print qty, print, then redefine print area

    You really don't have to set a print area. The code only prints the Range I pass to it.

    Added the Spin up to advance the cell.

    Please Login or Register  to view this content.

+ 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