i noticed that i have deleted the local arrayB in my original program. I have run your program. It not works. The purpose of putting local is i need to update the arrayB according to the value at Array. For example, if the arrayB have 4rows and 2 columns, x and y =TRUE, that row will be deleted, and the array will remain 3rows. but if in your program, even there is a deleted row of data, the array will remain 4 rows.
i hope u will understand what i try to say.