Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default fit to one page

Attempting to fit all data onto one page, with landscape orientation.
Possible error with line:
ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight,
RegionIndex:=1

(Any sugestions?)

Sub Macro6()
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.Orientation = xlLandscape
End With
ActiveWindow.View = xlPageBreakPreview
ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight,
RegionIndex:=1
ActiveWindow.SmallScroll Down:=-30
Range("A2").Select
End Sub

Thanx
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
Saving Excel 2010 files as web page or single file web page Joe Artis Excel Discussion (Misc queries) 3 April 29th 23 03:44 AM
Format page number in excel footer to start at a specific page # straitctrydncr Excel Discussion (Misc queries) 4 April 28th 23 07:45 PM
save page ,clear page, reuse same page dave Excel Programming 1 June 6th 07 06:01 AM
change and/or remove page number watermark in page break preview juga Excel Discussion (Misc queries) 2 December 25th 06 10:15 AM
excel fit to 1 page shows 1 page but not all data is on that page Jans Excel Programming 1 September 2nd 04 01:49 AM


All times are GMT +1. The time now is 04:20 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"