Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VBA causing "Excel has encountered a problem" 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default VBA causing "Excel has encountered a problem" message

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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VBA causing "Excel has encountered a problem" 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?




  #4   Report Post  
Posted to microsoft.public.excel.programming
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?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default VBA causing "Excel has encountered a problem" message

Just to add, Application.EnableEvents=False wouldn't prevent an Auto_open
routine to fire, but just hold Shift when opening. However if macros are
disabled the problem might not be related to VBA code at all, perhaps
something else.

Regards,
Peter T

"Ronald Dodge" wrote in 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?









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default VBA causing "Excel has encountered a problem" message

I thought about mentioned about EnableEvents not impacting the Auto_Open
procedure, but if macros are disabled anyhow, that would run anyways. I
didn't think about the Shift key method, which I have used before, but it's
been a very long time ago since I have used it.

--

Sincerely,

Ronald R. Dodge, Jr.
Master MOUS 2000

"Peter T" <peter_t@discussions wrote in message
...
Just to add, Application.EnableEvents=False wouldn't prevent an Auto_open
routine to fire, but just hold Shift when opening. However if macros are
disabled the problem might not be related to VBA code at all, perhaps
something else.

Regards,
Peter T

"Ronald Dodge" wrote in 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?









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding problem source causing "Your formula contains an invalid external reference to a worksheet" message Chrisso Excel Programming 2 May 11th 07 03:20 PM
"Excel has encountered a problem..." error The Hawk Excel Programming 6 April 15th 07 10:50 PM
can I bypass "Windows has encountered a problem" fredashe Excel Discussion (Misc queries) 0 April 15th 06 04:53 PM
XL "encountered a problem & needs to close" Don Rouse Excel Programming 3 July 19th 05 09:34 PM
"Microsoft Excel has encountered a problem..." Ken Dahlberg Excel Programming 1 July 22nd 03 09:51 PM


All times are GMT +1. The time now is 03:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"