Something Weird with Leban's MonthCalendar

M

Mike D

I installed the code a couple of weeks ago and it works
perfectly. I typically "tweak" my code and by doing so it
needs to ne compiled and saved. Periodically, it will not
compile, so I run the /decompile switch, and then re-
compile it. I've been doing this for years.

Anyway, after installing the MonthCalendar code I ran
the /decompile switch and when I went to compile and save
I got the following message:

Compile Error
A module is not a valid type

It refers to the Private mc As clsMonthCal which is
located under the Option Comapre Database and Option
Explicit.

Any idea what is happening here? If I do not use
the /decompile switch every works fine - plus I can
compile the modules without this error. It just doesn't
stay compiled - thus the reason for the /decompile switch.

Thanks
Mike
 
D

Douglas J. Steele

Decompiles should really only be done as a last resort, not as a matter of
course. See what MichKa has to say about this at
http://www.trigeminal.com/usenet/usenet004.asp

What sometimes happens is that class modules get decompiled into regular
modules. What you can try doing is copying all of the text from what's
supposed to be the class module into a text file, delete the module in
question then recreate it.
 
M

Mike D

Doug,
I actually do it as a last resort, but that happens
anytime I modify or add code. I have some code that runs
when my FE opens to tell me if the program has become
decompiled. I, then, compile and save the modules. Most
of the time this ends the issue. However, occasionally
even after I compile and save it doesn't "stick" so that
when I close and reopen the FE I get the "decompiled"
message again. That's when I use the /decompile switch.

I'll try your suggestion about recreating the module.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top