Visual Basic Error Message

B

BK

When starting Excel 2003, an error message box appears. "Microsoft Visual
Basic" appears in the dark blue header of the dialog box. The message
inside the box is "Compile Errors in hidden module <module name>" where the
module name is different every time we start Excel. Clicking the OK button
eliminates the error box and a new worksheet is ready to use. We can open
a new workbook without encountering the error message again. But when we
close Excel, we get the error message again.

Basically, the error message occurs when opening Excel and when exiting
Excel.

Any ideas on how to resolve this issue???
 
B

BK

Dave

Okay, looks like I'll get out my Sherlock Holmes hat and get to work.
Thanks for giving me a place to start. After looking at both of these
articles, my bet is that it is going to be in the start up files. I'll let
you know what I find.
 
B

BK

Well, Dave, I did everything suggested in both the articles you pointed me
to. The only thing that is positive is that I do not get any error messages
when I launch Excel in safe mode. There are no add-ins; there were three
..xlb files that I renamed to .old to no effect; I did the unregister and
register again with no effect; all the check boxes are set correctly; I did
a detect and repair; I cleaned out temp files; and I rebooted after every
chance just to make sure the changes took effect.

The only thing I know to do at this point is reinstall Excel from the Office
2003 installation disk. Is there anything else you would suggest?
 
D

Dave Peterson

When you open excel and get that error, you can go to the VBE to see what other
workbooks/addins have opened.

But you're saying that you don't see any addin in the project explorer in the
VBE?

Maybe it's a COM Addin.
Inside Excel (not the VBE)
tools|Customize|Commands tab|Tools Category
Look for COM Add-ins...

And drag it to your favorite toolbar. (I plopped it under Addins under the
Tools menu--seemed to make sense to me.)

Then close up that Customize dialog.

Then click on that new COM Add-ins... icon to see if you have any of those type
of addins loaded.
 
B

BK

Dave

You are correct in your understanding that I found no Add-ins in either the
Excel | Tools | Add-ins or in the Add-Ins manager when I went to VBE.

I'll try your new suggestion when I get back to the machine that is having
this problem and will keep you posted.
 
B

BK

Dave

I just had another thought. I know that if I delete normal.dot and then
open Word, a new blank document template (normal.dot) will be created.

Is there anything like that for Excel? Is there something I could delete so
that when I open Excel, a new blank workbook will open that doesn't have
these Visual Basic error messages???
 
D

Dave Peterson

There isn't an equivalent to normal.dot in excel.

You could have a personal.xls (or .xla) that could contain your own macros. But
either of these would appear in the project explorer in the VBE when you open
excel.

You're positive that you don't see any workbook's projects in the VBE, right?


Dave

I just had another thought. I know that if I delete normal.dot and then
open Word, a new blank document template (normal.dot) will be created.

Is there anything like that for Excel? Is there something I could delete so
that when I open Excel, a new blank workbook will open that doesn't have
these Visual Basic error messages???
 
B

BK

Dave

Okay, I think I might be getting confused. I launch Excel and get the
Microsoft Visual Basic error message about the compile error in the hidden
module. When I click the "ok" button, Excel finishes opening with a blank
workbook showing the standard 3 sheets.

At that point, I press Alt+F11 which open Visual Basic. In the pane on the
left is the Project - VBAProject (Book 1) which expands to show a folder
level named Microsoft Excel Objects which expands to show Sheet 1, Sheet 2,
Sheet 3, and This Workbook.

However, there are no Add-Ins in the Add-In Manager. Perhaps I don't really
know what else I'm looking for at this point. I haven't changed any of the
True or False settings in the "properties - this workbook" list because I
didn't see anything that looked amiss.

As I said, maybe I'm confused and don't know what I'm looking for anymore!!
Duh?!?!?!?!
 
D

Dave Peterson

Whe I do the same thing
open excel, open the VBE and hit ctrl-r to view the project explorer, I see a
few things open.

funcres(FUNCRES.XLA)
Personal(Personal.xla)
VBAProject(book1)

The first is the analysis toolpak addin.
The second is my set of personal macros.
The third is the new workbook that excel created when I opened excel.

If you only see the bottom one, check under each object (Sheet1, Sheet2, ...,
ThisWorkbook and any Modules) to see if you have code that could be doing the
damage.

If there is code in any of those objects in book1, then you probably have a
book.xlt file in your XLStart folder that has that code in it.

If you don't see code under any of those objects, then it isn't book.xlt's
fault. (In fact, this book.xlt may not even exist. It's used for setting up
defaults (margins, headers, ...) for new workbooks. But most people wouldn't
put any macros in this (at least I don't).)

But there are other types of Addins that do get loaded when excel starts. MS
makes it kind of difficult to locate them--that's why you have to add that COM
Addins option to your favorite toolbar--so you can find them easier.

You can also specify that excel open all workbooks in a folder when excel
starts.
Tools|Options|General Tab|At startup, open all files in:

For most people, this box should be empty. You may want to check.

And one other location that could be loading files when excel starts is in the
windows registry. But that's pretty unusual. I only remember seeing a couple
of people's post who had this problem in the last few years.

If nothing else works, you may want to look in the registry...

I saved this from a previous post.

In xl2002, the registry key is:
HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel\Options
(look for OPEN, OPEN1, OPEN2, etc.)

I think that these have to be in nice consecutive order. So you might have to
rename some to make them consecutive again (after you delete the offending one).

And since you're working in the registry, make sure you back it up before you
start.

========
It was for xl2002, so you'll have to look for your version (not necessarily
10.0).

Good luck and if you find the culprit, post back. It'll be good if Google has
your findings (for other victims, er, users.)
Dave

Okay, I think I might be getting confused. I launch Excel and get the
Microsoft Visual Basic error message about the compile error in the hidden
module. When I click the "ok" button, Excel finishes opening with a blank
workbook showing the standard 3 sheets.

At that point, I press Alt+F11 which open Visual Basic. In the pane on the
left is the Project - VBAProject (Book 1) which expands to show a folder
level named Microsoft Excel Objects which expands to show Sheet 1, Sheet 2,
Sheet 3, and This Workbook.

However, there are no Add-Ins in the Add-In Manager. Perhaps I don't really
know what else I'm looking for at this point. I haven't changed any of the
True or False settings in the "properties - this workbook" list because I
didn't see anything that looked amiss.

As I said, maybe I'm confused and don't know what I'm looking for anymore!!
Duh?!?!?!?!
 
B

BK

Dave

You're an angel to stay with me through this. I'll take all of this to the
office machine next week and give everything you suggest a try. Then I'll
let you know!!
 
B

BK

Okay, I give up. The only thing I did not do was go into the registry. I
tried everything else you've suggested, all to no avail.

I'm thinking (again) that I should probably reinstall Excel 2003 from the
Office 2003 original disks and then go to the Office Update site to get this
machine current. I just can't spend any more time trying to find this
"hidden module" that is having the compile error.

Thanks for everything!!
 
D

Dave Peterson

Good luck.

If you find the culprit, please post back.
Okay, I give up. The only thing I did not do was go into the registry. I
tried everything else you've suggested, all to no avail.

I'm thinking (again) that I should probably reinstall Excel 2003 from the
Office 2003 original disks and then go to the Office Update site to get this
machine current. I just can't spend any more time trying to find this
"hidden module" that is having the compile error.

Thanks for everything!!
 

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

Top