admat
New Member
- Joined
- Dec 20, 2018
- Messages
- 20
- Office Version
- 365
- 2019
- 2016
- 2013
- 2011
- 2010
- Platform
- Windows
Good Day,
I have button when clicked it prints a range of rows on a template.
B2 has the count of all the rows. Currently there are 5 rows of data
B4 the user enters from which row to print. Start row is 1.
The page is set to fit 5 rows so I should only get 1 page but it is printing the same page twice.
thanks in advance
I have button when clicked it prints a range of rows on a template.
Code:
Application.Dialogs(xlDialogPrint).Show
RowCount = Range("B2")
Worksheets("Payslips").Select
For i = 1 To RowCount Step 5
Range("B4").Value = i
ActiveSheet.PrintOut Copies:=1
Next i
End Sub
B2 has the count of all the rows. Currently there are 5 rows of data
B4 the user enters from which row to print. Start row is 1.
The page is set to fit 5 rows so I should only get 1 page but it is printing the same page twice.
thanks in advance
Last edited: