Compile Error and Compile error in hidden module
I think I have tracked down the cause of this error in a Word2003/VBA application.
My application WbWrd makes use of the utility library UW.DOT and at least two engines - one in FileR and one in Indxr.
Note that I have TWO versions of WbWrd in my Word2003 startup folder. WbWrd523a.dot and WbWrd532.dot.
WbWrd532.dot is the more recent, but I had reason to roll back to the earlier version WbWrd523a.dot.
Although the two versions have different file names, they share a common Project name "WbWrd".
I believe my mistake was failing to de-activate WbWrd532.dot.
When I exit Word2003 and move WbWrd532.dot to a separate folder, then my WbWrd523a.dot happily compiles web pages.
But having both versions of the application in the startup folder seems to generate the Compile error randomly, to my eyes.
Example: A series of edits to a web document followed by a recompile sometimes generates the Compile Error and sometimes does not. WbWrd is complex and different content probably sends WbWrd through a different part of the WbWrd VBA code.
Example: A series of different source documents will generate Compile errors in some but not in others; the errors appear to me to be random.
I suspect that Word2003/VBA gets confused in an internal table that manages references to libraries of VBA code, and trips over itself, and VBA decides that this is a Compile Error.
I opened each template in the startup folder and used Debug, Compile, and no template reported a syntax error, so this sounds like a run-time conflict of some sort, rather than a Syntax error.
Cheers, Chris
See other topics Compile error in hidden module ...
-
- PlutoniumLounger
- Posts: 15581
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Compile error in hidden module ...
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle
-
- Administrator
- Posts: 78378
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Compile error in hidden module ...
It sounds plausible that having two add-ins with the same project name and procedures/functions with the same name would confuse Word/VBA.
Best wishes,
Hans
Hans
-
- PlutoniumLounger
- Posts: 15581
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Compile error in hidden module ...
Well Yes!
Having a template with more than two procedures can confuse Word/VBA
I posted it as a heads-up.
"Compile Error" struck me as an unsuitable message for the error. I would have preferred something along the lines of "Conflict in uniqueness of names", but then, Word/VBA can't report a conflict if it is not smart enough to work out that a conflict exists, can it?
Cheers, Chris
There's nothing heavier than an empty water bottle
-
- Administrator
- Posts: 78378
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Compile error in hidden module ...
Many VBA error messages are unsuitable for the error...
Best wishes,
Hans
Hans
-
- PlutoniumLounger
- Posts: 15581
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Compile error in hidden module ...
The greatest confusion comes from some of the error messages being correct and applicable.
If only all them them were incorrect or inapplicable, we would know where we stand.
Not that I'm complaining ...
Cheers, Chris
There's nothing heavier than an empty water bottle
-
- Microsoft MVP
- Posts: 1316
- Joined: 24 May 2013, 15:33
- Location: Warminster, PA
Re: Compile error in hidden module ...
The ones that give me headaches are the ones that (as I know from experience) mean "I have no idea what's wrong" but then proceed to give instructions for fixing the error in a way that's guaranteed to make things worse.ChrisGreaves wrote: ↑03 Jan 2023, 16:32The greatest confusion comes from some of the error messages being correct and applicable.
If only all them them were incorrect or inapplicable, we would know where we stand.
Not that I'm complaining ...
Cheers, Chris
-
- PlutoniumLounger
- Posts: 15581
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Compile error in hidden module ...
Jay Freedman wrote: ↑04 Jan 2023, 00:17... instructions for fixing the error in a way that's guaranteed to make things worse.
Cheers, Chris
There's nothing heavier than an empty water bottle