G
Guest
The following code, after using for over 2 years, suddenly gives error.
Hi-lites FORMULA at line with >>>>>>
Compile Error: Wrong number of arguments or invalid property.
Checked same code on my test computer, on numerous files and it works great.
Tried changing FORMULA to lower case - It auto flips back to Upper Case.
Deleted code, and replaced it with working copy from test computer.
As soon as I tried it, it again came up with same error and it had flipped
'Formula' to 'FORMULA'.
I also tried it after completely closing all files and Excel, Re-opening
Excel, open one file that I know worked on my test machine. Still the same
problem.
Any suggestions would be greatly appreciated.
Thank You
Sub FooterInsertFormat()
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup.CenterFooter = ""
.RightFooter = "&""Arial,Bold""&8&F / &A" & Chr(10) & "Page &P of &N"
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.6)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
End With
End Sub
Hi-lites FORMULA at line with >>>>>>
Compile Error: Wrong number of arguments or invalid property.
Checked same code on my test computer, on numerous files and it works great.
Tried changing FORMULA to lower case - It auto flips back to Upper Case.
Deleted code, and replaced it with working copy from test computer.
As soon as I tried it, it again came up with same error and it had flipped
'Formula' to 'FORMULA'.
I also tried it after completely closing all files and Excel, Re-opening
Excel, open one file that I know worked on my test machine. Still the same
problem.
Any suggestions would be greatly appreciated.
Thank You
Sub FooterInsertFormat()
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup.CenterFooter = ""
.RightFooter = "&""Arial,Bold""&8&F / &A" & Chr(10) & "Page &P of &N"
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.6)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
End With
End Sub