Hidden Dan
Board Regular
- Joined
- Dec 7, 2016
- Messages
- 63
Friends,
I got this code to enable Print Preview of selected range. However, if pressing 'Close Preview' or even finishing printing I obtain an error. So apparently code contains a missing link.
I do need Print Preview dialogs because user should be able to modify printing options.
What should be added to this code to make it run well ?
Thanks,
Dan
I got this code to enable Print Preview of selected range. However, if pressing 'Close Preview' or even finishing printing I obtain an error. So apparently code contains a missing link.
I do need Print Preview dialogs because user should be able to modify printing options.
Code:
Sub Print_Range()
With ActiveSheet.PrintPreview
.PrintArea = "MyDuoRange"
.Orientation = xlLandscape
.PrintTitleRows = "$1:$2"
End With
End Sub
What should be added to this code to make it run well ?
Thanks,
Dan