I was supplied this code as an answer to a post at:
http://www.ozgrid.com/forum/showthread.php?t=73583
However, it errors out at
Saying "object variable or With block variable not set"
I have xl2000. Could this be the problem?
With the code I'm trying to locate my "Total" row. Then delete all columns from D:O with a value of zero. An example sheet is supplied at the link.
Thank you very much for your time and help.
http://www.ozgrid.com/forum/showthread.php?t=73583
Code:
Sub asdf()
Dim c As Range
Dim x As Long
Dim y As Integer
Set c = Columns("A:B"). Find(" Total", lookat:=xlWhole)
x = c.Row
For y = 15 To 4 Step -1
If Cells(x, y) = 0 Then Columns(y).Delete
Next y
End Sub
However, it errors out at
Code:
x = c.Row
I have xl2000. Could this be the problem?
With the code I'm trying to locate my "Total" row. Then delete all columns from D:O with a value of zero. An example sheet is supplied at the link.
Thank you very much for your time and help.