ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Lost Visual Basic Project and Invalid File Format errors (https://www.excelbanter.com/excel-programming/318241-lost-visual-basic-project-invalid-file-format-errors.html)

Annette

Lost Visual Basic Project and Invalid File Format errors
 
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.

Annette

Lost Visual Basic Project and Invalid File Format errors
 
Thanks. We'll give the tools a try. I appreciate your ideas.

"keepITcool" wrote:


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 :

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.




All times are GMT +1. The time now is 02:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com