Microsoft Office Tutorials and References
In Depth Information
Figure 18-6. A worksheet and the PrintTitleRows property
With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(1)
.RightMargin = Application.InchesToPoints(1)
.PrintTitleRows = "A1"
.PaperSize = xlPaperLetter
End With
Note the use of the InchesToPoints function, which is required if we want to express
units in inches, since most of the formatting properties require measurement in points.
Referring to Figure 18-6 , the PrintTitleRows property will cause the word Report, which
lies in cell A1, to appear on each page of the printout.
Figure 18-6. A worksheet and the PrintTitleRows property
18.3 Protection in Excel XP
Excel XP introduces some additional protection features, beginning with the Protection object,
which we discuss next.
18.3.1 The Protection Object
When you protect a worksheet, Excel permits you to specify that certain operations are still
permitted on unlocked cells. At the user level, this is done through the Protection dialog box. At
the programming level, it is done through the properties of the Protection object. Most of these
properties (listed below) are self-explanatory. Note that all of these properties except
AllowEditRanges are Boolean.
AllowDeletingColumns
AllowDeletingRows
AllowEditRanges
AllowFiltering
AllowFormattingCells
AllowFormattingColumns
AllowFormattingRows
AllowInsertingColumns
AllowInsertingHyperlinks
AllowInsertingRows
AllowSorting
AllowUsingPivotTables
 
 
Search JabSto ::




Custom Search