Hi there,
I am looking for a code or macros that would print the current sheet then change the date in a specific cell 'B3' by one day before printing again for that day and so on and so forth...
Thanks in advance for any replies!
Hi there,
I am looking for a code or macros that would print the current sheet then change the date in a specific cell 'B3' by one day before printing again for that day and so on and so forth...
Thanks in advance for any replies!
Try this
![]()
ActiveSheet.PrintOut Range("B3") = Range("B3") + 1
You don't specify how many copies you want to print, if known at all.
As long as you select Yes on the Message Box it will continue with printing with the next date.
Try it on a copy of your workbook.![]()
Sub NextDate() Dim j As Integer Dim Msg, Style, Title, Response, MyString Msg = "Do you want to continue ?" Style = vbYesNo + vbCritical Title = "More printing?" j = 0 Do ActiveSheet.PrintPreview '<----- Change to Print the page or area Response = MsgBox(Msg, Style, Title) If Response = vbNo Then Exit Sub Else j = j + 1 Range("B3").Formula = "=TODAY() + " & j End If Loop End Sub
BTW, are you an Oiler fan now after the last game?
I guess your neighbour (Dave) has an easier solution
Last edited by jolivanes; 02-26-2012 at 05:09 PM. Reason: Saw Dave's post after
Your asking a guy from Calgary if he is an Oiler Fan?
Well Dave, with all respect, some people see the light (as it looks like, in the future)
@visi
If you want to use the code I supplied, you should add
between Title = "More printing?" and j = 0![]()
Range("B3").Formula = "=TODAY()"
This will set the date to the date when you run it anew.
Good luck with the Flames as they can still make the playoffs. Hope they do. Our team won't.
Thank you so much for the replies guys. This worked great! and sorry not an Edmonton fan at all!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks