Article ID: 141093
Article Last Modified on 10/11/2006
Sub Set_Print_Titles()
With DialogSheets("titles")
'If the user presses Cancel in the Dialog box, then the two lines
'of code below the ".Show" method are not executed
If .Show Then
'The following two lines will set Print Titles to the ranges
'that are in the two edit boxes on the dialog sheet.
'If the edit boxes are empty, then Print Titles are cleared.
ActiveSheet.PageSetup.PrintTitleRows = _
.EditBoxes("rowrange").Text
ActiveSheet.PageSetup.PrintTitleColumns = _
.EditBoxes("colrange").Text
End If
End With
End Sub
121401 XL: Setting Print Area and Print Titles on Worksheet
Additional query words: 5.00a 5.00c 7.00a XL7 XL5
Keywords: kbhowto kbprogramming kbcode KB141093