+ Reply to Thread
Results 1 to 4 of 4

Hiding Blank Rows in All Sheets

  1. #1
    Forum Contributor
    Join Date
    11-07-2005
    Posts
    280

    Hiding Blank Rows in All Sheets

    Hi everybody,

    I use the following code to hide blank rows in the active sheet,,

    I want it to work with all sheets,

    Can you help me in this case,

    Please Login or Register  to view this content.
    Thank you,

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    You can try with this code (using most of your source):

    Sub Hide()

    With ActiveWorkbook
    For Each Sh In .Sheets
    Sh.Select
    For a = 1 To 1000
    BK = Sh.Cells(a, 1)
    If BK = "" Then
    Sh.Rows(a).Hidden = True
    End If
    Next
    Next
    End With
    End Sub

  3. #3
    Forum Contributor
    Join Date
    11-11-2005
    Posts
    267
    Just a minor tinkering with Antoaka's code: No need to select sheets...it slows code down, if infinitesminally.

    Please Login or Register  to view this content.
    HTH
    Myles

    ...constantly looking for the smoother pebble while the whole ocean of truth lies before me.

  4. #4
    Forum Contributor
    Join Date
    11-07-2005
    Posts
    280
    Thank you so much Mr. antoka05 for your fast reply and perfect code,

+ 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