Lost Visual Basic Project and Invalid File Format errors

G

Guest

We have a large Excel workbook template that is used by 100 people in the
company. After it is saved, 1 out of every 20 or so reports that it has lost
its VB project when the workbook is reopened ((Lost VB Project, Lost ActiveX
Controls). And a few of them cannot be reopened at all – we get an Invalid
File Format error. These are evene agreater concern as they cannot be
recovered. We're trying to ascertain why it happens to some and not to
others when everyone is using the same template (it is stored on a network
share). Any suggestions would be appreciated.
 
K

keepITcool

Annette,

sometimes this happens.. as excel files may build up some 'dirt' over
time and may get corrupted... (in my experience shared files are more
prone to this)

when excel starts misbehaving the first thing to do is clean the temp
directory.

but that probably is not enough..
and you'll have to do some serious maintenance on the template.

most likely causes/cures:
named ranges.
(use "NameManager" from JK Pieterse)

too many formats
too many number formats

dirty code
export/remove/reimport all code and forms.
(use "VBA code cleaner" from Bovey)


in some extreme cases it is wise to start with a fresh file
and just copy cells/objects and modules to it.
(avoid copying entire worksheets as you'll copy all dirt with it)


Both addins are available from http://www.bmsltd.ie/MVP/MVPPage.asp

HTH...




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Annette wrote :
 

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