Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Set col/row width/height (Excel2003)

    I don't know if this has been done before (attached)
    I select a contiguous set of columns, and the macro SetWidthToRightColumn sets all selected column widths to that of the rightmost column.
    Likewise SetWidthToLeftColumn, SetHeightToBottomRow, SetHeightToTopRow.
    Attached Files Attached Files

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

    Re: Set col/row width/height (Excel2003)

    Thanks. It's not really necessary to loop through the rows or columns. The following instructions will have the same effect as looping:

    Selection.ColumnWidth = Selection.Columns(Selection.Columns.Count).ColumnW idth

    Selection.ColumnWidth = Selection.Columns(1).ColumnWidth

    Selection.RowHeight = Selection.Rows(Selection.Rows.Count).RowHeight

    Selection.RowHeight = Selection.Rows(1).RowHeight

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Set col/row width/height (Excel2003)

    >It's not really necessary to loop through the rows or columns.
    Right.
    Any day now I'll shed my IBM 1620 FORTRAN II habits ... <img src=/S/burnup.gif border=0 alt=burnup width=31 height=31> <img src=/S/hugs.gif border=0 alt=hugs width=41 height=25>

Posting Permissions

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