+ Reply to Thread
Results 1 to 3 of 3

how to resize column width in the worksheets

  1. #1
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    how to resize column width in the worksheets

    hey MY FRIENDS,

    i want to write a code for making B columns size 25 in all worksheets except 2 sheets called "sales" and "products"

    can u help me please?

  2. #2
    Forum Contributor
    Join Date
    03-21-2012
    Location
    Ho Chi Minh city
    MS-Off Ver
    Excel 2003
    Posts
    180

    Re: how to resize column width in the worksheets

    PHP Code: 
    Option Explicit
    Sub GPE_COM
    ()
     
    Dim Sh As Worksheet
     
    For Each Sh In ThisWorkbook.Worksheets
        
    If Sh.Name "Sales" Or "Product" Then
            Columns
    ("B:B").Select
            Selection
    .ColumnWidth 24.99
        End 
    If
      
    Next Sh
    End Sub 

  3. #3
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: how to resize column width in the worksheets

    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

+ 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] [How to] If width of selected picture is bigger than 25 cm, resize picture width to 25 cm
    By 1tane1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2013, 09:12 AM
  2. Resize column width based on page setup settings?
    By Joel Mills in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2012, 03:13 PM
  3. Auto-resize Column Width
    By dk54 in forum Excel General
    Replies: 3
    Last Post: 03-29-2011, 10:55 PM
  4. Not showing column width during resize
    By branco in forum Excel General
    Replies: 2
    Last Post: 01-08-2010, 07:52 AM
  5. [SOLVED] Resize individual cells w/o changing the entire column width
    By Mary Ann in forum Excel General
    Replies: 3
    Last Post: 04-28-2006, 11:45 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