Results 1 to 3 of 3

Thread: FitSelection

  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts
    FYI

    [pre]Public Function FitSelection(aw As Window, blnFitSelection)
    aw.Zoom = blnFitSelection
    End Function[/pre]
    A nifty little function that is supposed to shrink fonts to near-unreadable size when employed.
    I select the used range of the worksheet and run the function:[pre] ActiveSheet.Cells(1, 1).Select
    ActiveSheet.UsedRange.Select
    Call FitSelection(ActiveWindow, True)[/pre]
    but it seems to me that if the worksheet has a chart object, the compression is insufficient.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Chart objects do not belong to the UsedRange, as illustrated in the screenshot below. The UsedRange on the left has been selected.

    [attachment=82604:x.png]
    Attached Images Attached Images
    • File Type: png x.png (10.0 KB, 0 views)

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='763164' date='03-Mar-2009 15:39']Chart objects do not belong to the UsedRange,[/quote]

    Thanks, hans.
    And Agreed.
    But the "zoom to fit selection" seems to me to be warped when a chart is present.
    It's early days yet; I started using it this morning and will probably stumble on the glaringly-obvious solution before the day is through.
    In Hawaii.

Posting Permissions

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