Hi there,
See if the following code gets you moving in the right direction:
Option Explicit
Sub PrintWorksheet()
Const sSHEET_NAME As String = "Sheet1"
Const sCELL_1 As String = "A1"
Const sCELL_2 As String = "E1"
Dim vNoOfCopies As Variant
Dim iNoOfCopies As Integer
Dim iCopyNo As Integer
Dim wks As Worksheet
vNoOfCopies = InputBox("How many copies do you want to print?")
If IsNumeric(vNoOfCopies) Then
Set wks = ThisWorkbook.Worksheets(sSHEET_NAME)
iNoOfCopies = CInt(vNoOfCopies)
For iCopyNo = 1 To iNoOfCopies
With wks
If iCopyNo > 1 Then
.Range(sCELL_1).Value = .Range(sCELL_1).Value + 1
End If
.Range(sCELL_2).Value = .Range(sCELL_1).Value + 1
.PrintOut
End With
Next iCopyNo
Else
If vNoOfCopies <> vbNullString Then
MsgBox "You did not enter a valid (integer) number of copies"
End If
End If
End Sub
The highlighted values may be altered to suit your requirements.
Hope this helps - please let me know how you get on.
Regards,
Greg M
Bookmarks