Check your code to make sure that when you open Excel you are only opening one instance of it because if you are opening two, for example, when you run the quit command it will only close one.
Try closing down all your workbooks before running the quit command as well.