Tony,
Rick answered you post, but I would like to suggest a little better coding
style. You make it easier to read. IMHO, all executable code should start on
the first tab in th editor and indented to make it easy to read. Also,
mixing the style of using the : in an If Then statment with new lines can be
confusing. Just as a suggestion for your own benefit and for anyone who has
to read your code later:
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
If Me.Page = 1 Then
Me.Section(acPageHeader).Visible = False
Else
Me.Section(acPageHeader).Visible = True
End If
End Sub
Now, here is a version using With ..End With that reads easily and believe
it or not executes more quickly:
With Me
If .Page = 1 Then
.Section(acPageHeader).Visible = False
Else
.Section(acPageHeader).Visible = True
End If
End With
Now, here is another way.
Me.Section(acPageHeader).Visible = Me.Page <> 1
(Don't you just love VBA
![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
White space is stripped out of the compiled version, so it really doesn't
hurt to use it to make it easier us inferior human types.