Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default PrintPage OFFSET problem


My Print on one page doesnt seem to be working properly (I'm being a
idiot being the most likely cause)

I have set as a nam
MyPrintRange=OFFSET(View!$C$62,-1,-1,COUNTA(View!$C:$C),29)

And from a button on the Front Sheet the macro:

Sub PrintOnePage()
ActiveSheet.PageSetup.PrintArea = "MyPrintRange"
With ActiveSheet.PageSetup
.CenterHorizontally = True
.CenterVertically = True
.Orientation = xlLandscape
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

It consistently prints out all I am asking it to do and the 58 blan
rows underneath it aswell!

What am I doing wrong?

Many thanks for everybodies help and tolerance.

Eddi

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default PrintPage OFFSET problem

With ActiveSheet.PageSetup
.CenterHorizontally = True
.CenterVertically = True
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

--
Regards,
Tom Ogilvy


"universal" wrote in message
...

My Print on one page doesnt seem to be working properly (I'm being an
idiot being the most likely cause)

I have set as a name
MyPrintRange=OFFSET(View!$C$62,-1,-1,COUNTA(View!$C:$C),29)

And from a button on the Front Sheet the macro:

Sub PrintOnePage()
ActiveSheet.PageSetup.PrintArea = "MyPrintRange"
With ActiveSheet.PageSetup
CenterHorizontally = True
CenterVertically = True
Orientation = xlLandscape
FitToPagesWide = 1
FitToPagesTall = 1
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

It consistently prints out all I am asking it to do and the 58 blank
rows underneath it aswell!

What am I doing wrong?

Many thanks for everybodies help and tolerance.

Eddie


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to

creating financial statements


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default PrintPage OFFSET problem


Thanks for your prompt response.

Unfortunately that doesnt seem to make any difference.

Anything else I might try?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default PrintPage OFFSET problem

did you put the periods in front of each property as I showed?

If zoom is not set to false, it overrides fit to pages.

To the best of my knowledge, that is the only setting which would case this
problem.

Try turning on the macro recorder and doing page setup manually. Remove
unnecessary settings to speed up execution, but don't remove the zoom
setting you record. It should look like

With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

Note that Zoom is set to false. and the attributes are preceded by periods.

--
Regards,
Tom Ogilvy


--
Regards,
Tom Ogilvy

"universal" wrote in message
...

Thanks for your prompt response.

Unfortunately that doesnt seem to make any difference.

Anything else I might try?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to

creating financial statements


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
OFFSET problem alan82 Excel Worksheet Functions 4 November 20th 08 02:55 AM
Offset Problem Dawn Excel Discussion (Misc queries) 4 June 11th 08 06:44 PM
OFFSET PROBLEM txm49 Excel Discussion (Misc queries) 2 October 11th 07 08:15 PM
Offset VBA Problem jlclyde Excel Discussion (Misc queries) 3 September 18th 07 04:00 PM
Offset Problem cford31 Excel Programming 4 November 10th 03 03:11 PM


All times are GMT +1. The time now is 02:32 AM.

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"