Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I read your post correctly, you wanted to use a command button to run the
macro that gets the next twenty rows. Create a CommandButton1, or change the name in the code, and try this: Private Sub CommandButton1_Click() Set srcRng = Range("A12:A211") 'Define the range r = 12 'enumerate beginning row 'Find the last visible row in the range s = srcRng.SpecialCells(xlCellTypeVisible).Count 'Get the next 20 rows Range("A" & s + r).Resize(20, 1).EntireRow.Hidden = False End Sub "GoBucks" wrote in message ... Thank you! I will give these a try. "ND Pard" wrote: Sub Macro_for_Obect_1() Dim i As Integer i = 32 Do While i <= 212 If Rows(i).EntireRow.Hidden = True Then Range(Rows(i), Rows(i + 19)).EntireRow.Hidden = False Exit Sub End If i = i + 20 Loop End Sub Sub Macro_for_Object_2() Range("A32:A211").EntireRow.Hidden = False End Sub Sub Macro_for_Object_3() Range("A32:A211").EntireRow.Hidden = True End Sub Good Luck |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
hiding/unhiding rows | Excel Worksheet Functions | |||
hidden rows but not from hiding/unhiding? | Excel Discussion (Misc queries) | |||
unhiding and hiding rows | Excel Discussion (Misc queries) | |||
Hiding/unhiding rows | Excel Discussion (Misc queries) | |||
Hiding/Unhiding rows | Excel Programming |