Deleting Rows From a dataset

I am trying to delete a range of rows from a dataset. The rows that I am trying to delete conatin account numbers with the first three characters = 231. My account numbers are in column b and l is defined as a row on the worksheet.

The code I am trying to use is as follows:

If Left(Range("b" & l), 3) = 231 Then Rows("l").Delete

I do not know why it will not work and I am not getting an error message. Any suggestions?

[567 byte] By [NutoVBA] at [2008-1-8]
# 1

Hi

Remove the quotes from around the L in Rows("l").Delete

Regards

Peter Mo.

PeterMo. at 2007-10-2 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...