+ Reply to Thread
Results 1 to 3 of 3

Add white space above and below cells

  1. #1
    Registered User
    Join Date
    04-15-2010
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    15

    Angry Add white space above and below cells

    Auto height adjust

    Can anyone tell me why this doesn't work, I can get it to set height in an active cell, but when I select multiple cells it dosn't work ??

    Sub test()
    With ActiveSheet.Range(Cells(3, 1), Cells(16, 6)).Select
    ' first fit in standard manner
    .Rows.AutoFit

    'align the text vertically
    .VerticalAlignment = xlCenter

    'wrap the text
    .WrapText = True

    'increase the row height
    .RowHeight = .RowHeight + 12
    End With
    Range("C20").Select
    End Sub

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Add white space above and below cells

    With ActiveSheet.Range(Cells(3, 1), Cells(16, 6)).Select is causing the error

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    04-15-2010
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Add white space above and below cells

    Many thanks, that seems to have helped

    Quote Originally Posted by :) Sixthsense :) View Post
    With ActiveSheet.Range(Cells(3, 1), Cells(16, 6)).Select is causing the error

    Please Login or Register  to view this content.

+ 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