I often encounter an error when using VB6 or VBA code to automate processes in Excel. I use Excel 97 with various versions of windows, when running on Windows NT4 SP5 the error reads:

The instruction at "0x779db669" referenced memory at "0x00000009". The memory could not be "read".

From what I can gather searching the web, this error might have something to do with OLEAUT32.DLL but alas I can find no fix.

It seems to occur at the same point in an automated process but does not occur every time which leads me to think it's not my VB code causing it. There is no specific set of code that causes it - it might result from a click event procedure or a procedure to update the contents of a control however I can't tie it down to any particular line of my VB code.

Can anyone shed some light on why this error is occurring? It's really causing me problems with some of the projects I'm currently undertaking.