Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JBW JBW is offline
external usenet poster
 
Posts: 42
Default formatting page with VBA

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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default formatting page with VBA

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---

--
RyGuy


"Sandy Mann" wrote:

You have an "s" missing from:

..fitToPagesWide = 1

--
HTH

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


Replace @mailinator.com with @tiscali.co.uk


"JBW" wrote in message
...
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Page Formatting Feather 52 Excel Worksheet Functions 1 January 31st 07 06:09 PM
formatting page in exel vwf New Users to Excel 1 December 7th 06 08:26 PM
Page break formatting changes when sent via e-mail munozl Excel Discussion (Misc queries) 1 May 22nd 06 12:54 PM
formatting page numbers sadhana444 Excel Discussion (Misc queries) 0 February 6th 06 09:27 PM
Page Formatting Sarah Hoey Excel Discussion (Misc queries) 2 December 28th 04 03:13 PM


All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"