1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Creating a Macro in Excel: Date by addition when printing

Discussion in 'Business Applications' started by aem9266, Jun 18, 2017 at 11:05 AM.

  1. aem9266

    aem9266 Thread Starter

    Good Morning,
    I am attempting to create a print preview, and then a printing button for one of my documents. I figured out how to do a basic print preview and then print when approved. If possible, I would like to create 5 copies (currently just pressing the button 5 times) and on each consecutive copy, have the date increase by one. I have the start date for printing appearing on a sheet called "WT" in cell C1 and would like it to appear in cell H1 for the worksheets ending in "SI" and then in cell AJ4 in worksheets ending in "TS". Not sure if this is possible, but any help would be greatly appreciated. I posted my current VPN coding for previewing and then printing these lists, but if you could help with one, I'm pretty sure I could figure out the other. Just please let me know if there are any changes in the "printout" phrases, please.
    Thanks for your help in advance

    Sub PrintPreviewCrewLists()
    Worksheets(Array("A SI", "A TS", "B SI", "B TS")).PrintOut Preview:=true
    For i = 1 To 5
    Range("H1") = Range("H1") + 1
    ActiveWindow.Worksheets(Array("A SI","B SI")).PrintPreview Copies:=1
    Next i
    For i = 1 To 5
    Range("AJ4") = Range("AJ4") + 1
    ActiveWindow.Worksheets(Array("A TS", "B TS")).PrintPreview Copies:=1
    Next i
    End Sub

    Printing macro has not been updated as I have not figured out how to preview it successfully.

    Sub PrintCrewLists()
    Worksheets(Array("A SI", "A TS", "B SI", "B TS")).PrintOut
    End Sub
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!


Short URL to this thread: https://techguy.org/1191668