G
Guest
Hi,
I've searched all over this forum and the help files to figure out how to
fix the below macro which works up until it can no longer find the string and
then I get a run-time error 91 on the cells.find line:
Sub delregion()
Dim x As String
x = "region total"
Do While x = "region total"
Cells.Find(What:="region total").Activate
ActiveCell.EntireRow.Select
Selection.Delete Shift:=xlUp
ActiveCell.EntireRow.Select
Selection.Delete Shift:=xlUp
Loop
End Sub
TIA for your help.
Allan
I've searched all over this forum and the help files to figure out how to
fix the below macro which works up until it can no longer find the string and
then I get a run-time error 91 on the cells.find line:
Sub delregion()
Dim x As String
x = "region total"
Do While x = "region total"
Cells.Find(What:="region total").Activate
ActiveCell.EntireRow.Select
Selection.Delete Shift:=xlUp
ActiveCell.EntireRow.Select
Selection.Delete Shift:=xlUp
Loop
End Sub
TIA for your help.
Allan