Hi,
I have a UserForm with a command button that, when pressed, causes page 1 and 2 of any worksheet named with a 5-digit number (eg: 76349) to be printed.
For Each ws In ThisWorkbook.Worksheets
If ws.Name Like "#####" Then
ws.PageSetup.Orientation = xlLandscape...