Print Mon-Fri using button

oxicottin

Board Regular
Joined
Feb 21, 2007
Messages
126
Hello, I have a sheet named "Spot Check" with a date in cell C7. Every week I have to print 5 of these sheets out (Mon-Fri) and change the date on each one. Is there some way I can add a button that would only show on the sheet and not on the printout that would print the dates for the week starting with the date in C7 and as it prints it changes the date in the C7 cell? Also, can I have it so it skips sat and sun and shows following weeks Mon after it prints the 5 days.

Thanks,
Chad
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Ok, I got some of it but cant figure out how to add two days to the date after it prints the five days. I took some VBA I had in another Sheet and put it for this one. I have a number 4 in J7 so it prints five days.

Code:
Sub FiveDays()

Dim lngMyCount As Long

With Sheets("Spot Check")

    For lngMyCount = 1 To .Range("J4")

        .PrintOut
        .Range("C7") = .Range("C7") + 1

    Next lngMyCount
    
End With

End Sub
 
Upvote 0
I figured it out....

Changed the C7 number to a 5 and date to monday. and run this code......

Code:
Sub FiveDays()

Dim lngMyCount As Long

With Sheets("Spot Check")

    For lngMyCount = 1 To .Range("J7")

        .PrintOut
        .Range("C7") = .Range("C7") + 1

    Next lngMyCount
    
End With
'Increment
ActiveSheet.Range("C7").Value = ActiveSheet.Range("C7").Value + 2
ActiveSheet.Calculate
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,538
Messages
6,179,412
Members
452,912
Latest member
alicemil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top