Hi there,
I've got a macro which iterates through a list removing unnecessary rows until all the required criteria are met. In order to deal with the criteria, I've created two dictionaries (dict and dict2) which each have the same Keys, but different values (desired value and current value). The code snipped below finds a random row, tests to see whether the desired value has been reached against each of the keys in the dictionary. If it hasn't been reached by any of the keys, the row is deleted, dict2 value is updated to the new current value, and the loop continues. If it has been reached for any of the keys, I've used GoTo to jump past the amendment to current value and line deletion and the loop continues until all criteria are met.
I've tested this a number of times and the loop runs successfully - updating dict2, deleting only the rows it needs to and continuing the loop. It hits an issue, however, when the value for a Key in both dict and dict2 are the same (which is meant to be the goal). This is when the second If loop allows it to bypass the deletion with GoTo, but instead I'm getting an error: "Run-time error '10': This array is fixed or temporarily locked". Does anyone know why this might be happening - it only occurs when the Key value is the same in both dictionaries. What am I missing here?
Thanks in advance for any help you can give me on this.
-Pang
Bookmarks