Setting variables to Nothing most likely does nothing to save memory. BTW your use of Variants is wasteful oif memory and speed but that's not your problem. Your problem is that you are not setting your created objects like rs to Nothing.