We have developed a program in Excel VBA.
Say for instance we are having a compiler problem in one of the functions (Debug->Compile VBAProject gives some type mismatch error).
Without clicking that option, is there any way after the program load, we can intimate the user by showing a message like "You have compiler error in your test program, please click Debug->Compile VBAProject and fix the compiler errors"?
Actual problem is, a program (Excel VBA) is having compiler error, but the user doesn't know it. He just started running the program which results in failure.
So after the program load, without manually clicking Debug->Compile, after the excel is launched, it should throw a pop-up saying "you are having compiler errors, Do Debug->Compile VBAProject and fix it".
The actual error is "Compiler error: User-defined type not defined".
As part of our software installation, we are installing certain DLLs in the customer machine. The customer can add those DLLs as reference and edit their program.
As the Excel program is having a compiler error, "OnProgramLoaded interpose" function is not called. So the code inside that function is not executed. The user has no clue that this code is not called.
Additional information: Earlier we have the "Compile On Demand" checkbox as checked. So even though there is a compiler error in the program, the "OnProgramLoaded interpose" function is getting called. Now for different reason, we have removed the check box from "Compile On Demand", so what happens now is, since there is compiler error, it is not executing the other functions too.
So what we are trying to do is, as soon as the program is launched, we need to give the message to user that the program is having compiler errors. Fix it and restart the program.