Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Page Setup problem in Excel 97 (SR-2(i))

    Hi
    I have a workbook with a "template" worksheet and a "settings" worksheet in it. The VBA code gets the number of columns to display/print in the template from the settings worksheet.
    I have set the Scaling in Page setup of the Template worksheet to be 1 page by ??? (empty) pages. This is supposed to give me the maximum scaling that would fit one page wide by how ever many pages tall.

    EXCEPT...

    When I have 4 columns, or some number of columns that would fit on a single page, this does not revert back to 100%, but stays the same as the last settings it had.

    Any clue why? or how to fix it?

    TIA

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Page Setup problem in Excel 97 (SR-2(i))

    What you need to do is have your code set the print area each time you change the spreadsheet and then run code something like the following :<pre>
    With ActiveSheet.PageSetup
    .FitToPagesWide = 1
    .FitToPagesTall = False
    End With</pre>

    When you set the scaling, it is based on whatever scaling gives the desired result att that time, as it seems to be converted to a % and left at that.

    Hope it helps

    Andrew C

  3. #3
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Page Setup problem in Excel 97 (SR-2(i))

    Andrew

    Thanks for your response, but that is exactly what I am doing?! I have the Fit to Pages Tall empty so that it would figure it out automatically.

    I do remember there was a nice XLM code that would return the number of [ages to print, ahead of time, maybe then I can set it that way.

    Any idea where I can find that XLM code?

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •