Hi Emilia
Thanks for your and other replies. The first changes that I noticed on
those damaged class modules that they 5/6 empty lines at the top. Based
on all of the contributers's suggestion, I did following procedures that
fixed the problem (pls note that all of these steps may not be
required!!!).
1. delete all the class modules
2. Decompile the database so that it can decompile completely
3. Compact the database
4. Add a new class module (INSERT -> CLASS MODULE)
copy the content of a class (eg clsExpParam) from the backup and
paste on this (new!) class module. save it with the class name
(clsExpParam)
I repeated this process to create all the class modules.
5. Debug -> Compile and Save all modules
6. Compact the database
7. Just to make sure if it still had problem, I decompiled and
recompiled the database.
8. And compact the database again. This time the class modules had
no problem.
I thank you for all for contributing your expert advices.
-avi
Originally posted by Emilia Maxim
> avishesh wrote:
>
> >I've created some class modules and one them is attached in this
> mail.
> >Whenever I decompile the database it looks like all the class
> modules
> >are changed to "module" because I am getting following error when
> I try
> >to compile the module.
> >Compiler Error. Only valid in Object Module.
>
> avi,
>
> not every class module is an object module. The latter would mean a
> form or a report module, so your modules are not necessarily changed
> into standard modules.
>
> Did you take a look to the code if it's still OK after decompiling? I
> once had a DB gone corrupt, there was only rubbish after decompiling.
> And also, which code line throws the error? This can be very
> important.
>
> As for the code, I cannot see anything wrong, but there is one line
> you should maybe give more details:
>
> >Public Property Let fileName(in_strFileName As String)
> > strFileName = sysFileHndUtil.correctFileName(in_strFileName,
> _
> > sysXLUtilities.getFileFormatType(strFileFormat,
> "EXTN"))
> >End Property
>
> What are sysFileHndUtil and sysXLutilities? They seem to be some
> objects, but where and how are they defined?
>
> >'When instance is removed, remove the objects from memory
> >Private Sub Class_Terminate()
> >End Sub
>
> Is there really no code in the Sub?
>
> Best regards
> Emilia
>
> Emilia Maxim
> PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de/"]http://www.maxim-software--
service.de[/url]
--
Posted via
http://dbforums.com