+ Reply to Thread
Results 1 to 4 of 4

Autofit Row Height plus add "10"

Hybrid View

  1. #1
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167

    Autofit Row Height plus add "10"

    Is it possible to autofit a row and then add "10" to the new height?
    Example:
    If autofit set the row height to "15" I would want to change the row height adding "10" (25 total).
    Autofit would have to be first.
    Last edited by Rick_Stanich; 07-08-2009 at 10:13 AM.
    Regards

    Rick
    Win10, Office 365

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,461

    Re: Autofit Row Height plus add "10"

    Sub X()
    
        Dim rngRow As Range
        
        Selection.EntireRow.AutoFit
        For Each rngRow In Selection.Rows
            rngRow.EntireRow.RowHeight = rngRow.EntireRow.RowHeight + 10
        Next
        
    End Sub
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,331

    Re: Autofit Row Height plus add "10"

    As in:
    With ActiveCell.EntireRow
       .AutoFit
       .RowHeight = .RowHeight + 10
    End With
    for example?
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167

    Re: Autofit Row Height plus add "10"

    Sometimes, I just dont think.

    Thank you both.

+ 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