Results 1 to 2 of 2

Thread: column width

  1. #1
    Join Date
    Aug 2003
    Location
    London,UK
    Posts
    54

    Unanswered: column width

    how can i change the column width in vba, not using a static figure but the auto size. Like when you double click on the end of the column and it automatically adjusts itself so everything fit in the cell.

    thanx all

  2. #2
    Join Date
    Oct 2003
    Posts
    1,091
    Use this line to adjust all columns in the worksheet:

    Code:
        Cells.Columns.AutoFit
    Or for a specific column (in this case D):

    Code:
        Columns("D: D").Columns.AutoFit
    Last edited by shades; 12-15-03 at 10:40.
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

Posting Permissions

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