I'm a VBScript learner. I'm trying to delete the rows if a particular column's cell value is empty in excel. This is the snippet which I've written.
set mysheet1 = myxl.ActiveWorkbook.Worksheets(1)
Row1=mysheet1.UsedRange.Rows.Count
For i= 1 to Row1
If len(mysheet1.cells(i,1).value) = 0 then
mysheet1.Cells(i, 1).EntireRow.Delete
End If
Next
Unfortunately it's not deleting the rows. What might be the issue? Please help. Thanks in advance.