M
Mikmo
I'm getting error 13 "type mismatch" when I run the below code. I'v
tested it on a small new excel sheet and it work fine. There are n
other macros in my excel sheet so no conflicts.
Any ideas?
I'm trying to hide all rows were the value in column A of that row i
blank / 0.
Sub blank_rows()
Dim ws As Worksheet
Dim wb As Workbook
Dim hide_rw As Long
Application.EnableEvents = False
Set wb = ActiveWorkbook
Dim end_row As Integer
For Each ws In wb.Worksheets
end_row = ws.Range("A65536").End(xlUp).Row 'this assumes th
last value is in Column A.
For r = 1 To end_row 'change the 4 to be the first row you wis
to check
* If ws.Cells(r, 3).Value = "" Then*
ws.Rows(r).Hidden = True
End If
Next
Next
Application.EnableEvents = True
End Su
tested it on a small new excel sheet and it work fine. There are n
other macros in my excel sheet so no conflicts.
Any ideas?
I'm trying to hide all rows were the value in column A of that row i
blank / 0.
Sub blank_rows()
Dim ws As Worksheet
Dim wb As Workbook
Dim hide_rw As Long
Application.EnableEvents = False
Set wb = ActiveWorkbook
Dim end_row As Integer
For Each ws In wb.Worksheets
end_row = ws.Range("A65536").End(xlUp).Row 'this assumes th
last value is in Column A.
For r = 1 To end_row 'change the 4 to be the first row you wis
to check
* If ws.Cells(r, 3).Value = "" Then*
ws.Rows(r).Hidden = True
End If
Next
Next
Application.EnableEvents = True
End Su