Hi, thank you for contacting JustAnswer.com. My name is Russell. I will do my best to provide the right answer to your question.
Try the old code, first of all, I suggest. It may be that you only thought you changed the code, but really didn't. In that case, the old code should work - after one or two tries, perhaps.
Follow procedure in your safe's manual carefully, when entering the code to open it, and also when changing the code.
(Are you saying that you changed the code with the door open?)
How old is the safe? measured from date of original purchase.