D
David J Richardson
I have a rather large (in terms of code, number of controls, and data
stored in cells) spreadsheet in Excel 2007 which intermittently fails
when running VBA code (and may or may not result in Excel crashing
shortly thereafter). Doing a "Save As..." (or two, or three, or more,
if I'm unlucky) will produce a "good copy" which runs happily.
Further, what constitutes a "good copy" varies from machine to machine
(the spreadsheet is used on up to ten machines at times), with no
pattern arising over time to show particular machines are "luckier".
The places the code break are limited and predictable, and are not
unusual lines in and of themselves. As noted the solution to the code
not working is nothing to do with editing the code (or indeed any other
part of the spreadsheet), just doing a "Save As...".
Any suggestions of what "Save As..." does that may explain this, and
perhaps therefore other methods to resolve this more permanently/more
easily?
P.S. In investigating this, I noted "Save As..." is not deterministic
-- ie. doing two "Save As..."s from the same file is likely to create
two different files (I have no idea if there is a functional
difference; I'm just noting a size difference). Dunno if this plays any
part in my varying luck when trying to create a "good copy" on the
different machines, starting from the same base file in each case.
stored in cells) spreadsheet in Excel 2007 which intermittently fails
when running VBA code (and may or may not result in Excel crashing
shortly thereafter). Doing a "Save As..." (or two, or three, or more,
if I'm unlucky) will produce a "good copy" which runs happily.
Further, what constitutes a "good copy" varies from machine to machine
(the spreadsheet is used on up to ten machines at times), with no
pattern arising over time to show particular machines are "luckier".
The places the code break are limited and predictable, and are not
unusual lines in and of themselves. As noted the solution to the code
not working is nothing to do with editing the code (or indeed any other
part of the spreadsheet), just doing a "Save As...".
Any suggestions of what "Save As..." does that may explain this, and
perhaps therefore other methods to resolve this more permanently/more
easily?
P.S. In investigating this, I noted "Save As..." is not deterministic
-- ie. doing two "Save As..."s from the same file is likely to create
two different files (I have no idea if there is a functional
difference; I'm just noting a size difference). Dunno if this plays any
part in my varying luck when trying to create a "good copy" on the
different machines, starting from the same base file in each case.