Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Feb 2003
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Centering a range on the screen (2003)

    When my app opens, I want to center range B2:M15 with one col and one row showing as a border around this range.

    I selected A1:N16, then used ActiveWindow.Zoom=True

    This gets me close but I want col A and N to have the same width and Row 1 & 16 to have the same height.
    This also needs to work on all monitors.- different size, diferent resolution etc.

    How do I do this with code?
    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Centering a range on the screen (2003)

    What is keeping you from making the column widths of columns A and N equal, and the heights of rows 1 and 16?
    Or do you mean something else, i.e. that range A1:N16 should fill the window?

  3. #3
    3 Star Lounger
    Join Date
    Feb 2003
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Centering a range on the screen (2003)

    I can manually adjust all of this but when I use it on another machine, or a clients', with a differnt screen size or aspect ratio, it is no longer centered.

    On my desktop, the screen is nearly square, while on my laptop the monitor is wider than it is high. I want the opening code to center the range on the screen.

    Thanks

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Centering a range on the screen (2003)

    I don't think that's easy, especially for the columns, since column widths are specified in character widths, not in points. Wishing to change the zoom percentage at the same time further complicates things.
    But perhaps someone else will come up with a suggestion.

Posting Permissions

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