EXCEL.EXE has generated an error...when closing a workbook

  • Thread starter Thread starter HEIKKILÄT
  • Start date Start date
H

HEIKKILÄT

System shows this promt every time I close particular workbook. Workbook
contains usage of variables and ODBC queries from Pervasive SQL database.

I'm tired debugging macros piece by piece without any solution.
 
HEIKKILÄT,

Used to get this all the time. Now only once in a while.

Some of the culprits:
Modules and macros with the same name
Modules, macros, and variables using reserved names for Excel
such as "row", "column", "sum". [if your not sure use the F1 key
after you have selected the suspected word, should come up with
Not Found]
Variables declared as Public and also dim'ed in a module.!!!!!!!!
Problems in code - make sure you have Option Explicit at the top
of all your modules and than compile them. Go to this site
http://www.bmsltd.co.uk/mvp/ and download the code cleaner.
Works great...

Temp folders that have too much in them. I am constantly emptying
mine, and also the Internet Temp files folder (but do this through the
Tools menu in my explorer). Don't forget your Recyle Bin.

Took some work to go through my books, but it has been worth the trouble.
And now I write code more carefully...
 
Back
Top