Results 1 to 18 of 18

Thread: Hiding rows in a function

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Hmm,

    now it hides all the rows 1 untill 50, when all 50+ rows should be hidden...

    I might have to be some more specific, this is what i do :

    Function tabledim(ws As Worksheet, h As Integer, w As Integer)
        Dim i As Integer
        Dim k As Integer
        Dim n As Integer
    n = Cells.SpecialCells(xlCellTypeLastCell).Row
    For i = 1 To 7 * h
            Rows(i).RowHeight = 7.5
        Next i
    k = 7 * h + 1
        Rows(k & ":" & n).Hidden = True
    End Function
    (The first 50 rows will have data later on)

    EDIT: i think i'm seeing 'n' wrongly, it probably doesn't mean 'end of document' ?
    Last edited by Aero; 05-04-2010 at 11:04 AM.

Posting Permissions

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