ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unhide rows (https://www.excelbanter.com/excel-programming/310630-unhide-rows.html)

Zenia[_2_]

Unhide rows
 

Hello,
Plz can anybody help me with this code.

Sub CleanUp()
Application.ScreenUpdating = False
Dim CurrentRow As Long
Dim UsedRows As Range
On Error GoTo Abort
Set UsedRows = ActiveSheet.UsedRange.rows
For CurrentRow = UsedRows.rows.Count To 1 Step -1
If UsedRows.rows(CurrentRow).Columns("A:A") = 0 Then
UsedRows.rows(CurrentRow).EntireRow.Hidden = True
Else
UsedRows.rows(CurrentRow).EntireRow.Hidden = False
End If
Next CurrentRow
Abort:
Application.ScreenUpdating = True
End Sub

the problem is that my entire column ie column A is linked to anothe
workbook. And i want to unhide rows when the data is updated from blan
to some entry, as i had to manually do it from format. Plz help me t
unhide the rows when the data is updated.
Tx in advanc

--
Zeni
-----------------------------------------------------------------------
Zenia's Profile: http://www.excelforum.com/member.php...fo&userid=1450
View this thread: http://www.excelforum.com/showthread.php?threadid=26178


Trevor Shuttleworth

Unhide rows
 
Zenia

try:

Sub CleanUp()
Dim CurrentRow As Long
Dim UsedRows As Range
Application.ScreenUpdating = False
On Error GoTo Abort
Set UsedRows = ActiveSheet.UsedRange.Rows
UsedRows.EntireRow.Hidden = False ' <<<<<
For CurrentRow = UsedRows.Rows.Count To 1 Step -1
If UsedRows.Rows(CurrentRow).Columns("A:A") = 0 Then
UsedRows.Rows(CurrentRow).EntireRow.Hidden = True
Else
UsedRows.Rows(CurrentRow).EntireRow.Hidden = False
End If
Next CurrentRow
Abort:
Application.ScreenUpdating = True
End Sub

Regards

Trevor
"Zenia" wrote in message
...

Hello,
Plz can anybody help me with this code.

Sub CleanUp()
Application.ScreenUpdating = False
Dim CurrentRow As Long
Dim UsedRows As Range
On Error GoTo Abort
Set UsedRows = ActiveSheet.UsedRange.rows
For CurrentRow = UsedRows.rows.Count To 1 Step -1
If UsedRows.rows(CurrentRow).Columns("A:A") = 0 Then
UsedRows.rows(CurrentRow).EntireRow.Hidden = True
Else
UsedRows.rows(CurrentRow).EntireRow.Hidden = False
End If
Next CurrentRow
Abort:
Application.ScreenUpdating = True
End Sub

the problem is that my entire column ie column A is linked to another
workbook. And i want to unhide rows when the data is updated from blank
to some entry, as i had to manually do it from format. Plz help me to
unhide the rows when the data is updated.
Tx in advance


--
Zenia
------------------------------------------------------------------------
Zenia's Profile:

http://www.excelforum.com/member.php...o&userid=14502
View this thread: http://www.excelforum.com/showthread...hreadid=261781





All times are GMT +1. The time now is 12:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com