Need help debugging 1004 error in Excel 97

T

The Fold

Hi,

I've recently setup a new PC to run some company reports. This is a
process I've done numerous times in the past, but for some reason,
when I press the macro shortcut (Ctrl+R) to run any report, it gets as
far as the page layout macro and then comes back with an error like

Runtime error 1004

Unable to set PrintTitleRows property of the PageSetup class

and it does this for every row of code that uses that class.

Here's a sample of code:

With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = "&""Arial,Bold""Handheld Concession Sales"
.CenterHeader = ""
.RightHeader = "&""Arial,Bold""&D"
.LeftFooter = "&""Arial,Bold""&9&F / &A"
.CenterFooter = ""
.RightFooter = "&""Arial,Bold""&9&P of &N"
.LeftMargin = Application.InchesToPoints(0.748031496062992)
.RightMargin = Application.InchesToPoints(0.748031496062992)
.TopMargin = Application.InchesToPoints(0.984251968503937)
.BottomMargin = Application.InchesToPoints(0.984251968503937)
.HeaderMargin = Application.InchesToPoints(0.511811023622047)
.FooterMargin = Application.InchesToPoints(0.511811023622047)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With
Range("A1").Select

Any ideas? I'm pretty desperate as I need these reports to run this
weekend.

Thanks
 
T

Tom Ogilvy

Do you have a printer/print driver installed on that computer. You must
have at least a print driver installed to use page setup.
 
T

The Fold

Do you have a printer/print driver installed on that computer. You must
have at least a print driver installed to use page setup.

Ah, that did the trick!

Thanks a lot....shame google didn't have anything on this one! (I
guess it will now)
 
B

bf1

Thanks to both of you for posting and answering... this timely post
just saved me today.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top