global variable size string array with ability to insert and remove entries vba excel

Viewed 22

I have a number of rows in a sheet and the user selects whether they wish them to be copied to another sheet through marking them with an x in a column. On applying custom filters to the data the x stays in the column it was in. I'm thinking if I maintain a global array of strings which can store the name of the person an x has been placed against, which I can do at the point the x is added, and remove them from the list when the x is removed, then when the list is filtered I can clear the x's from the column and re-write them in if there is a match with the row name in column A.

The following shows the issue I am having after the data has been filtered from 9 rows down to 1:

Filter Bug

I have the following set up to clear the x's hanging around in column E Range("E2:E9999").ClearContents but I'm stumped on how to create and initialise the global string array that I can push and pop values in to.

0 Answers
Related