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
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
te ayuda esto

Code:
   'des-esconder
    ActiveSheet.Range("A5:A43").EntireRow.Hidden = False
    
    'escondiendo
    ActiveSheet.Range("A5:A43").EntireRow.Hidden = True
 
Upvote 0
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:
Upvote 0
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
 
Upvote 0
De nada. Estaba feliz de ayudar. Gracias por la respuesta.
 
Upvote 0

Forum statistics

Threads
1,212,927
Messages
6,110,697
Members
448,293
Latest member
jin kazuya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top