+ Reply to Thread
Results 1 to 2 of 2

ActiveWindow.VisibleRange.Width - Is this the correct code

Hybrid View

  1. #1
    StevenS
    Guest

    ActiveWindow.VisibleRange.Width - Is this the correct code

    Is this the correct code to size a cell to the size of a users screen no
    matter what the size
    'eg
    Columns("p:p").ColumnWidth = ActiveWindow.VisibleRange.Width / 8 (8 = factor
    to convert to pixels)
    --
    SS

  2. #2
    Vasant Nanavati
    Guest

    Re: ActiveWindow.VisibleRange.Width - Is this the correct code

    No. Try the following (no guarantees!) instead of 8 in your denominator:

    (Columns("P:P").Width / Columns("P:P").ColumnWidth)

    --

    Vasant


    "StevenS" <StevenS@discussions.microsoft.com> wrote in message
    news:41BE99FE-6B76-4F00-9BA0-242CFA553694@microsoft.com...
    > Is this the correct code to size a cell to the size of a users screen no
    > matter what the size
    > 'eg
    > Columns("p:p").ColumnWidth = ActiveWindow.VisibleRange.Width / 8 (8 =
    > factor
    > to convert to pixels)
    > --
    > SS




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1