LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Using macro to change printrange / fit-to-page

Hello all

I have a macro to create an invoice. At the end the worksheet is copied to a new worksheet and automatically saved. But when I want to print this new worksheet it doesn't fit on 1 page. When I use the fit-to-page option in the print-options box it's working. But I want to do this in the macro. So after I copied the sheet, I would like to give a command to set fit-to-page

This is the syntax I use to copy
Sheets("Invoice").Selec
Window1$ = ActiveWindow.Captio
Range("A1:M50").Selec
Selection.Cop
Workbooks.Ad
Window2$ = ActiveWindow.Captio
ActiveSheet.DropDowns.Add(144, 105.75, 248, 15.75).Selec
ActiveSheet.Past
Windows(Window1$).Activat
Range("B2").Selec
Application.CutCopyMode = Fals
Windows(Window2$).Activat

Anyone an idea how I can do this

Thanks in advance for any help

Marco.
 
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
How do you change the print preview page names i.e. 'page 1'? cudge_usa Setting up and Configuration of Excel 1 September 1st 09 08:25 PM
Excel formula to change page # when data entered in other page Solograndma Excel Discussion (Misc queries) 2 March 12th 07 01:35 PM
change page number watermark in page break preview juga Excel Discussion (Misc queries) 2 December 25th 06 10:16 AM
change and/or remove page number watermark in page break preview juga Excel Discussion (Misc queries) 2 December 25th 06 10:15 AM
Slow Macro on Page Margin Change for all sheets Far Excel Programming 1 April 23rd 04 01:38 AM


All times are GMT +1. The time now is 07:01 AM.

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

About Us

"It's about Microsoft Excel"