ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Handle Compile Errors (https://www.excelbanter.com/excel-programming/313481-handle-compile-errors.html)

JeffT

Handle Compile Errors
 
I have a bit of Macros/VB Code that requires various OCXs and such to be
installed. If the user doesn't install correctly, and the mscal.ocx is
missing, for example, they will get "Compile Error in hidden module...".

I would like to handle these errors myself and give an error message like
"Run the Setup, Bozo." However the "On Error" only handles run-time errors,
not compile errors. Is there a way to handle these errors?

The only solution I've thought of so far is to actually check to see that,
for example, the file c:\windows\system32\mscal.ocx exists. Since some of
these things can be in more than one place, I'd prefer an error handling
method.

Thanks,
Jeff

Tom Ogilvy

Handle Compile Errors
 
You could run through the References collection and see if any references
are broken. It would depend on when the error occurs.

--
Regards,
Tom Ogilvy

"JeffT" wrote in message
...
I have a bit of Macros/VB Code that requires various OCXs and such to be
installed. If the user doesn't install correctly, and the mscal.ocx is
missing, for example, they will get "Compile Error in hidden module...".

I would like to handle these errors myself and give an error message like
"Run the Setup, Bozo." However the "On Error" only handles run-time

errors,
not compile errors. Is there a way to handle these errors?

The only solution I've thought of so far is to actually check to see that,
for example, the file c:\windows\system32\mscal.ocx exists. Since some of
these things can be in more than one place, I'd prefer an error handling
method.

Thanks,
Jeff





All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com