Hi,
I currently have a program written that pulls data onto 3 separate worksheets. I'm looking for code I can put into a new module that will delete rows with with no data in each worksheet.
I have the following, however when I run my program as a whole I get an error stating "nocells"
I currently have a program written that pulls data onto 3 separate worksheets. I'm looking for code I can put into a new module that will delete rows with with no data in each worksheet.
I have the following, however when I run my program as a whole I get an error stating "nocells"
Code:
Sub DelBlankRows()
Worksheets("pwr").Columns(2).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Worksheets("pwrone").Columns(2).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Worksheets("pwrtwo").Columns(2).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub