Skip to main content

IDEA crashing after the whole procedure run is completed

Hi All,
I need some advise where to look at to resolve the problem I am currently experiencing.
I created a code which is quite lenghty (around 1800 lines).The main sub calls 14 different functions (mainly summarization , extraction and export, but also appending fields and gap detection). There is only 1 main database which is always used by all of the fuctions (some other databases are created on the basis of the original DB but they are always closed before code moves to the next function).
When I run each function individually it works perfectly and when I run the whole code together it also works ok unitl the last function is performed and the message box is dispalyed that all funcions that have been executed. The problem starts when I press ok button on the MsgBox as the database seems to get frozed after and IDEA crashes displaying error message that is will be shut.
Did anyone experience anything similar? Any idea or suggestion where should I look for to narrow down the problem?
I am not able to provide the code due to company policy I built the code for (it wouldnt be practical anyway due to the lenght of it).
Any advise would be greatly appreciated.