I am running an Excel VBA macro from a workbook macroWb
which:
- Opens an Excel Workbook
wb(k)
; - Copies some cells from that workbook to
macroWb
; - Executes some fairly basic Excel commands (formatting, assigning values to cells, etc.) within the workbook
macroWb
; - Closes
wb(k)
; - Repeats 1-4 for
wb(k+1)
.
Letting WBs = {wb(1),...,wb(n)}
, it seems that when I add further workbooks to WBs
Excel ends up crashing. But then, if you ran the macro at another time it doesn't crash anymore - e.g. yesterday evening the macro was crashing, then I ran it this morning with the same set WBs
as yesterday and it worked fine; I then added 3 new workbooks to WBs
and it crashed again.
The crash does not seem related to any particular wb(k)
as I have tested for that.
The crash details are as follows:
[...]
Fault Module Name: StackHash_f2b6
Fault Module Version: 0.0.0.0
[...]
Exception Code: c000041d
Exception Offset: 74384f69
[...]
Additional Information 1: f2b6
Additional Information 2: f2b6a6f8ea78ee3ad1bda3596b78feb6
Additional Information 3: 7b01
Additional Information 4: 7b010e90eab9e4895f15c0f6ba536eb5
Any idea of what might be causing this?