Consulting

Results 1 to 3 of 3

Thread: Solved: RowHeight - Multiple

  1. #1
    VBAX Tutor Philcjr's Avatar
    Joined
    Jul 2005
    Location
    Bedminster, NJ
    Posts
    208
    Location

    Solved: RowHeight - Multiple

    All,

    Is there a cleaner way of doing this, as I have many more rows with different hieghts?

    Range("19:19,22:22,25:25,28:28,31:31,34:34").RowHeight = 15.75

    Phil

  2. #2
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Hi Phil,

    If I understand you correctly, you could do something like:[vba] Dim i As Long
    For i = 19 To 34 Step 3
    Rows(i).RowHeight = 15.75
    Next[/vba]Alternately, if you wanted to change the height on every 3rd row until the end of the sheet, you could use[vba] Dim i As Long
    i = 19
    Do Until Intersect(Rows(i), ActiveSheet.UsedRange) Is Nothing
    Rows(i).RowHeight = 15.75
    Loop[/vba]Matt

  3. #3
    VBAX Tutor Philcjr's Avatar
    Joined
    Jul 2005
    Location
    Bedminster, NJ
    Posts
    208
    Location
    Thanks Matt,

    I was hoping to do something like...

    Rows(16,37,58,79).RowHeight = 15.75 Nice and neat

    I will be using your first example, thanks
    Phil

Posting Permissions

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