+ Reply to Thread
Results 1 to 4 of 4

window width vs column width

  1. #1
    Registered User
    Join Date
    10-25-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    79

    window width vs column width

    Hello,

    Does anyone know of a way to have the active window resize by width to fit only columns A:Q? I know of the zoom to method but I want to keep the zoom level what it is.

    I have been dabbling with some code that calculates the total width of the columns but have been having issues with an exact ratio for column widths to window width.

    Also does anyone know why the pixel width value of columns wont ever end in "5"? For example when I change a column width the pixel value will jump from 124 to 126 and actually resize, but then when I resize the same column again from 126 to 127, its doesn't actually resize the column and will show it as 126 pixels, and then when I resize to 127 pixels again it will actually resize. I think this could be the reason I'm having troubles finding a constant ratio for column widths to window width.

    Thanks, I know this may be hard to understand, I can try to clarify if necessary.

    also started topic here:
    http://www.ozgrid.com/forum/showthre...153#post796153
    Last edited by hopefulhart; 07-17-2017 at 12:39 PM. Reason: posted link to other forum

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: window width vs column width

    You don't need to calculate the widths. Highlight the first heading row and select 'Zoom to Selection' on the View Tab. You can record a macro while doing that...

  3. #3
    Registered User
    Join Date
    10-25-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    79

    Re: window width vs column width

    Thanks for the reply cytop,

    However that is not what I wanted. I dont want the zoom to change, I want the active window width to change.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,428

    Re: window width vs column width

    Rule 08: Cross-posting Without Links

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    No further help to be offered, please, until the OP has complied with this request.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Let dropdown list width expand beyond width of column so people can read answer choices?
    By xdrenched in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-15-2023, 02:05 AM
  2. VB Code to draw rectangle per data size
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2016, 11:52 AM
  3. Reconciling units: Column width and image width
    By MarmaladeLover in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2015, 03:03 PM
  4. Replies: 2
    Last Post: 07-30-2014, 11:13 AM
  5. Column Width vs. Text Width
    By jlt199 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2013, 11:45 AM
  6. Set Column Width Based On Total Width Of Other Columns
    By rayneraingoaway in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2006, 06:10 PM
  7. Field width when printing to immediate window
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2006, 09:10 AM

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