This problem has been going on for a couple of years and has become become very frustrating. I've sought help on various web sites over the last several years, but have never been able to solve it.
I built an Excel application with VBA macros a couple of years ago (on Excel 2000 I think - I'm now on 2003) on XP. I've worked on it over the years - adding this or deleting that, both because my needs for it have changed and also to see if I might accidently fix the problem.
The problem is this - when I run the application on Excel, most of the time it works great, but, almost at random, it crashes and I have to restart Excel. The only hints I have to it are as follows:
Crashes can occur at any time while the application is running - not at any particular event. Sometimes I'm just setting there looking at the screen thinking about what I want to do next - and it just crashes.
Running some macros in the application seem to make it a bit more stable - that is, if I run a macro that does reports frequently, I tend to have fewer problems (but not always).
Sometimes it gets to the point where it crashes every time I try to do something, even just change a value in a cell, and, then, the next day, it seems fine.
If it really gets bad, like to the point where it crashes when I first start the application, if I open the application, but disable macros, save it, and then reopen it and enable macros, its fine.
The application has a lot of internal worksheet linking and the macros copy and paste a lot of data between worksheets. Sometimes I get the impression that there's some internal Excel setting or somesuch that's getting confused, maybe related to formatting or copying and pasting, that's getting set to a conflicting value and Excel simply gives up. Its somehow related to macros, or aggrevated when macros are enabled.
I've never had any formal training in VBA, so it may well be that I'm not setting something up right, but the macros do seem to work, as does the application - most of the time.
Any help would be most appreciated.
I built an Excel application with VBA macros a couple of years ago (on Excel 2000 I think - I'm now on 2003) on XP. I've worked on it over the years - adding this or deleting that, both because my needs for it have changed and also to see if I might accidently fix the problem.
The problem is this - when I run the application on Excel, most of the time it works great, but, almost at random, it crashes and I have to restart Excel. The only hints I have to it are as follows:
Crashes can occur at any time while the application is running - not at any particular event. Sometimes I'm just setting there looking at the screen thinking about what I want to do next - and it just crashes.
Running some macros in the application seem to make it a bit more stable - that is, if I run a macro that does reports frequently, I tend to have fewer problems (but not always).
Sometimes it gets to the point where it crashes every time I try to do something, even just change a value in a cell, and, then, the next day, it seems fine.
If it really gets bad, like to the point where it crashes when I first start the application, if I open the application, but disable macros, save it, and then reopen it and enable macros, its fine.
The application has a lot of internal worksheet linking and the macros copy and paste a lot of data between worksheets. Sometimes I get the impression that there's some internal Excel setting or somesuch that's getting confused, maybe related to formatting or copying and pasting, that's getting set to a conflicting value and Excel simply gives up. Its somehow related to macros, or aggrevated when macros are enabled.
I've never had any formal training in VBA, so it may well be that I'm not setting something up right, but the macros do seem to work, as does the application - most of the time.
Any help would be most appreciated.