View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ronald Dodge[_2_] Ronald Dodge[_2_] is offline
external usenet poster
 
Posts: 130
Default VBA causing "Excel has encountered a problem" message

Not sure what you mean by cockpit error, but anyhow, you should only have to
type in the following line in the immediate window to disable the events in
excel from being fired up when they are normally triggered:

Application.EnableEvents=False

There's been times when I had to set this application property to true as
I'm not sure what causes it to go false, but found there has been times when
the Workbook Open Event doesn't always trigger, so we were forced to use the
Auto_Open sub private procedure to get around that issue.

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"arch" wrote in message
...
Unfortunately no and no to the first question. Attmepted to perform the
Application.EnableEvents with immediate window but assume cockpit error.
Not
sure of exact sequence to enable that function. VBA is still new to me.

I am also trying an alternate approach and having someone open with later
version of Excel as I've been told it should open - all I'm after is the
VBA
code. Learned my lesson - will backup from now on.

"Ronald Dodge" wrote:

Did you either make a backup copy of this file or export the VBA code to
a
"BAS" file?

Have you tried opening up Excel only, set the security level to medium
(if
not already there), go into design mode, set the
"Application.EnableEvents"
to false (This can be done via the immediate window on the VBA side), and
then open the file? Also, if you have UDFs, make sure calculation mode
is
set to manual before opening up the file.

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"arch" wrote in message
...
Added new VBA routine to Excel 2000 file which caused termination of
Excel.
The message occurs even if disable micros or when saved as a csv file.
Any
other options to be able to open the file and correct the faulty VBA
code?