excel vba - Decrement in for each loop -


is possible decrement in each loop in vba excel?

i have code this:

sub makro1()  dim rng range dim row range dim cell range  set rng = range("b1:f18")  each row in rng.rows     if worksheetfunction.counta(row) = 0         row.entirerow.delete         'previous row     end if next row  end sub 

and want step in commented statement. possible?

no.

you have use for...next loop , step backwards:

dim long = rng.rows.count 1 step -1     set row = rng.rows(i)     if worksheetfunction.counta(row) = 0         row.entirerow.delete         'previous row     end if next 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -