Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / August 2007

Tip: Looking for answers? Try searching our database.

Macro: ajust the print of a range to 1 page wide/tall

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Snoopy - 14 Aug 2007 10:15 GMT
Hey guys
It annoys me that I constantly have to ajust my prints to 1 page tall/
wide by using the printing tools, and put my self together in
intention to program a little piece of macro that will give me joy and
laughter back...
However - my skill are not as big as my selfconfidence, and failed -
so I have to send this discrete inquiry to the people of Excel-jungle
- full of vulnerable expectation of getting some help here.

My prosedure:
The user marks his range.
The macro prints this as ajusted 1 page print.

My effort:
   ActiveSheet.PageSetup.PrintArea = "B1:N53"
   With ActiveSheet.PageSetup *** bla bla bla
   End With

   ActiveSheet.PageSetup.PrintArea = "B1:N53"
   With ActiveSheet.PageSetup *** bla bla bla
       .FitToPagesWide = 1
       .FitToPagesTall = 1 *** bla bla bla
   End With

   ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

My problem.
PrintArea = "B1:N53" is constant what-so-ever

I hope the ussue is cearly presented and will be very grateful to be
helped

Regards
Snoopy
Zone - 14 Aug 2007 13:36 GMT
Snoopy, FitToPage doesn't want to work unless you explicitly set zoom to
false.  Also, if you want to print the entire sheet, don't set the print
area.  I also added a line to go ahead and print the sheet.  HTH, James

Sub PrintToFit()
   With ActiveSheet.PageSetup
       .PrintArea = ""
       .Zoom = False
       .FitToPagesWide = 1
       .FitToPagesTall = 1
   End With
   ActiveSheet.PrintOut
End Sub

> Hey guys
> It annoys me that I constantly have to ajust my prints to 1 page tall/
[quoted text clipped - 30 lines]
> Regards
> Snoopy
Snoopy - 14 Aug 2007 13:56 GMT
> Snoopy, FitToPage doesn't want to work unless you explicitly set zoom to
> false.  Also, if you want to print the entire sheet, don't set the print
[quoted text clipped - 46 lines]
>
> - Vis sitert tekst -

Holy Cow! You are a genius!!
Thanks a lot zone

Kindly regards
Snoopy
Zone - 14 Aug 2007 14:12 GMT
Glad to help.  Thanks for the feedback and kind words!  Cheers, James

>> Snoopy, FitToPage doesn't want to work unless you explicitly set zoom to
>> false.  Also, if you want to print the entire sheet, don't set the print
[quoted text clipped - 52 lines]
> Kindly regards
> Snoopy

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.