formatting page with VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've hunted around for a solution to the page formatting problem within VBA
(very slow). Thought I'd found one but keep getting an error. can you see
anything obviously wrong with this?

Sheets("Statistics").Select
With Worksheets("statistics").PageSetup
.fitToPageWide = 1
.FitToPagesTall = False
.Orientation = xlLandscape
End With

it says theres an error with .fittopageswide = 1
 
You have an "s" missing from:

..fitToPagesWide = 1

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Probably the best way to learn is to turn on the macro recorder, go through
the motions, and then turn off the recorder and view your code to see what
you just did in VBA syntax.

Hope that helps,
Ryan---
 

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

Back
Top