There are several reasons that you might encounter an "Invalid Course Code" warning when you are attempting to enroll in a new course using a Course Code provided by your school.
Your school administrator may have closed the enrollment period for the course.
If this is the case, they will need to reopen it if they would like you to be able to enroll.
You may already be a part of the course and just need to be added to an additional program.
For example, you are already accepted into the EMSTesting portion of a course but now you need the Platinum Planner portion as well. The program will not allow your student account to enroll in the same course twice. If this is the case, an administrator would have to accept you into the second program if they would like you to be able to participate in those classes.
If you are not already apart of the course, there may have been a typo in relaying the code.
Confirming the code with your instructor will assure that you end up enrolling in the correct course.
So, if you run into an Invalid Course Code" warning your best course of action would be to reach out to your instructor as the potential causes will likely mean actions need to be taken on their part.