desesconder fila por fila

BLUEPOMME

New Member
Joined
Nov 15, 2018
Messages
22
como pongo el codigo vba para des-esconder fila por fila hasta llegar a fila 43 y empezando la 5 y después viceversa escondiendololas otra vez hasta llegar a la fila 5


gracias
 

igold

Well-known Member
Joined
Jul 8, 2014
Messages
2,429
te ayuda esto

Code:
   'des-esconder
    ActiveSheet.Range("A5:A43").EntireRow.Hidden = False
    
    'escondiendo
    ActiveSheet.Range("A5:A43").EntireRow.Hidden = True
 

BLUEPOMME

New Member
Joined
Nov 15, 2018
Messages
22
gracias por la pronta respuesta

esto escondería el rango completo a la vez lo que busco es esconder o des esconderlas filas uno por uno , lo que tengo es :

Code:
Dim i As LongIf Columns("A").SpecialCells(xlCellTypeVisible).Count = Rows.Count Then Exit Sub
i = 1
Do Until Rows(i).Hidden = True
    i = i + 1
Loop
Rows(i).Hidden = False


'ActiveSheet.Protect
End Sub
lo que hace que aparezcan las filas uno por uno, pero necesito que pare en fila 43, como completeria mi código ,

y otro código que hace lo mismo pero viceversa o sea ocultar las filas nuevamente desde fila 43 uno por uno hasta llegar a fila 5


gracias
 
Last edited:

igold

Well-known Member
Joined
Jul 8, 2014
Messages
2,429
Yo no hablo español. Estoy usando el traductor de Google. ¿Está esto más cerca de lo que quieres?

Code:
Sub unhide()
    Dim i As Long
    For i = 6 To 43
        Rows(i).Hidden = False
    Next
    'ActiveSheet.Protect
End Sub


Sub hide()
    Dim i As Long
    For i = 43 To 6 Step -1
        Rows(i).Hidden = True
    Next
    'ActiveSheet.Protect
End Sub
 

igold

Well-known Member
Joined
Jul 8, 2014
Messages
2,429
De nada. Estaba feliz de ayudar. Gracias por la respuesta.
 

Forum statistics

Threads
1,078,526
Messages
5,340,988
Members
399,404
Latest member
bmm

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top