Please post the VBA code - it's unlikely to be random, but unless we know what's in the code and at which point it is causing the error, we can't begin to help.