Good Morning All,
Having probelms with the below macro;
For a = 500 To 1 Step -1
If Rows(a).Hidden = True Then Rows(a).Delete
Next
End Sub
Im trying to delete the hidden rows in the attached workbook. I think the problem is when defining the number of rows in the work book. It is currently using 500, is there a way to make this search all rows with data, as at times the workbook could cotain more or less than 500 hundred rows?
When i run the current macro i get - Run-time error '1004' ; Delete method of Range Class failed
Thanks in advance iof any help you might be able to offer.
Bookmarks