+ Reply to Thread
Results 1 to 4 of 4

Print sheets until end of variable list is reached

Hybrid View

JamesT1 Print sheets until end of... 05-18-2019, 08:24 AM
6StringJazzer Re: Print sheets until end of... 05-18-2019, 09:37 AM
JamesT1 Re: Print sheets until end of... 05-19-2019, 03:53 AM
6StringJazzer Re: Print sheets until end of... 05-19-2019, 09:41 AM
  1. #1
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Print sheets until end of variable list is reached

    Good afternoon all

    I am looking for a way to move information into a print area then print the sheet,, carry on doing this until the end of a variable list is reached....

    On the attached sheet.... Column A has a list of numbers, this list can change each time,, what I am looking for is,, when the print button is pressed,, the first two numbers are copied into the green cells,, then the sheet prints,, the next two numbers are moved into the green cells then the sheet prints.. etc.. until the bottom of the list in column A is reached...

    I tried recording the macro,,, and this would work for a fixed list,,, but I'm not sure how to adjusy for a variable list

    any help would be very much appreciated

    Many thanks

    JT
    Attached Files Attached Files
    Last edited by JamesT1; 05-19-2019 at 03:54 AM. Reason: Solved

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,771

    Re: Print sheets until end of variable list is reached

    I successfully tested this on your file:

    Sub Macro3()
    
       Dim R As Long ' row
       
       R = 3 ' first data row
       With Sheet1
          Do Until .Cells(R, "A") = ""
             .Range("N6") = .Cells(R, "A")
             .Range("N17") = .Cells(R + 1, "A")
             ActiveWindow.SelectedSheets.PrintOut Copies:=1
             
             R = R + 2
          Loop
       End With
       
    End Sub
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Re: Print sheets until end of variable list is reached

    Jeff

    This works perfectly for me,,, many thanks for you valuable assistance....

    JT

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,771

    Re: Print sheets until end of variable list is reached

    You're welcome, glad to help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Controlling print area of sheets with variable-width content
    By The_Doc_Man in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-18-2018, 11:09 AM
  2. Set Print Area on several sheets with variable ranges on update
    By bungaree in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-16-2016, 05:37 PM
  3. creating a macro to print all sheets on dropdown list
    By winona123 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-07-2016, 01:12 PM
  4. [SOLVED] Print from variable list
    By Lacaycer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2012, 03:25 AM
  5. [SOLVED] SUM across rows (variable) until value is reached
    By bizzaro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-18-2012, 05:10 AM
  6. fill in a form from a list of data and print all sheets.
    By Donzie84 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-01-2009, 07:44 AM
  7. Replies: 1
    Last Post: 10-01-2009, 07:16 AM

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