Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error '1004'

  • Thread starter Thread starter -
  • Start date Start date
Status
Not open for further replies.

Guest
kool_kix (Visitor) May 22, 2002
I'm getting the following error.

"Run-time error '1004': Unable to set the CenterFooter property of the PageSetup class"

prntaSheet.Activate
prntaSheet.PageSetup.CenterFooter = "STYLE 1 : " & estsrcSheet.Cells(5, 1).Value & ", " & estsrcSheet.Cells(7, 1).Value & ", " & estsrcSheet.Cells(9, 1).Value & ", " & estsrcSheet.Cells(11, 1).Value & ", " & estsrcSheet.Cells(13, 1).Value
If estsrcSheet.Cells(5, 10).Value = "yes" Then
prntaSheet.PageSetup.CenterFooter = prntaSheet.PageSetup.CenterFooter & Chr(10) & "STYLE 2 : " & estsrcSheet.Cells(5, 2).Value & ", " & estsrcSheet.Cells(7, 2).Value & ", " & estsrcSheet.Cells(9, 2).Value & ", " & estsrcSheet.Cells(11, 2).Value & ", " & estsrcSheet.Cells(13, 2).Value
End If
If estsrcSheet.Cells(6, 10).Value = "yes" Then
prntaSheet.PageSetup.CenterFooter = prntaSheet.PageSetup.CenterFooter & Chr(10) & "STYLE 3 : " & estsrcSheet.Cells(5, 3).Value & ", " & estsrcSheet.Cells(7, 3).Value & ", " & estsrcSheet.Cells(9, 3).Value & ", " & estsrcSheet.Cells(11, 3).Value & ", " & estsrcSheet.Cells(13, 3).Value
End If
prntaSheet.Activate
'-------------------------
'ERROR OCURRS ON NEXT LINE
'-------------------------
prntaSheet.PageSetup.CenterFooter = prntaSheet.PageSetup.CenterFooter & Chr(10) & Chr(10) & "Bid Provided By : Art's Custom Cabinets, Inc. - (559) 562-2766"
prntaSheet.PageSetup.LeftFooter = estnumLabel.Caption

prntcSheet.Activate
With ActiveSheet.PageSetup
.CenterFooter = "STYLE 1 : " & estsrcSheet.Cells(5, 1).Value & ", " & estsrcSheet.Cells(7, 1).Value & ", " & estsrcSheet.Cells(9, 1).Value & ", " & estsrcSheet.Cells(11, 1).Value & ", " & estsrcSheet.Cells(13, 1).Value
If estsrcSheet.Cells(5, 10).Value = "yes" Then
.CenterFooter = ActiveSheet.PageSetup.CenterFooter & Chr(10) & "STYLE 2 : " & estsrcSheet.Cells(5, 2).Value & ", " & estsrcSheet.Cells(7, 2).Value & ", " & estsrcSheet.Cells(9, 2).Value & ", " & estsrcSheet.Cells(11, 2).Value & ", " & estsrcSheet.Cells(13, 2).Value
End If
If estsrcSheet.Cells(6, 10).Value = "yes" Then
.CenterFooter = ActiveSheet.PageSetup.CenterFooter & Chr(10) & "STYLE 3 : " & estsrcSheet.Cells(5, 3).Value & ", " & estsrcSheet.Cells(7, 3).Value & ", " & estsrcSheet.Cells(9, 3).Value & ", " & estsrcSheet.Cells(11, 3).Value & ", " & estsrcSheet.Cells(13, 3).Value
End If
'-------------------------
'ERROR OCURRS ON NEXT LINE
'-------------------------
.CenterFooter = ActiveSheet.PageSetup.CenterFooter & Chr(10) & Chr(10) & "Bid Provided By : Art's Custom Cabinets, Inc. - (559) 562-2766"
.LeftFooter = estnumLabel.Caption
End With
 
kool_kix,

The Center Footer allows a maximum of 253 characters (by my test procedure). You must be exceeding this limit. Sorry.

Regards,
M. Smith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top