well this appears to be wrong
says it is looking for a variable called inbox. I am guessing you want a
string there.
When you loop through the table and delete a row, you need to do it in reverse order, start at the end and go backwards.
The way you are doing it, you delete a row and than all of the indexes of the future rows move down one.
So if you had A,B,C,C,C,D,E,F
and you were deleting C
You would have expected
A,B,D,E,F
but instead you get
A,B,C,D,E,F
Eric