i need something like this :
Code:
Static counter As Integer = 1

        If counter = 1 Then

            'Print the string

            e.HasMorePages = True

            Exit Sub

        End If

        If counter = 2 Then

           'Print the string

            e.HasMorePages = False

        End If
but this will unfortunately print only two pages
I cant understand how to set the upper limit of the counter since the user will select at the runtime how many pages he want to print in the PrintDialog......
Please help