ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBE freezes after running macros (https://www.excelbanter.com/excel-programming/359739-vbe-freezes-after-running-macros.html)

[email protected]

VBE freezes after running macros
 
I have been having a problem with the VBE editor freezing after I run
various VBA macros. I'll excecute a macro with VBE either open or
closed. After the macro ends, I enter VBE, and the editor is
completely unresponsive. All I get is a beep if I try to click on
anything. I can't even exit VBE. The only way to restore the VBE is
to completely close Excel and restart it. Excel still works fine and I
can rerun the macro. Some of the macros that have caused this problem
are as simple as one that displays a basic user form that only has an
unload form instruction for it's cancel event click.

An example of the offending code is

Module1:

Option Explicit
Private Sub CommandButton1_Click()
Unload UserForm1
End Sub


UserForm1:

Option Explicit
Private Sub CommandButton1_Click()
Unload UserForm1
End Sub

UserForm1 is just a window with a button on it.

I'm using Excel 2002 running on Windows XP Professional.

Any ideas?


Jim Thomlinson

VBE freezes after running macros
 
One of the main culprets of that is if you are editing a cell (have not
commetted the change you are making to a cell) then you can not edit code, or
if there is any kind of a dialog or message box requiring your attention,
then the VBE will be unresponsive.
--
HTH...

Jim Thomlinson


" wrote:

I have been having a problem with the VBE editor freezing after I run
various VBA macros. I'll excecute a macro with VBE either open or
closed. After the macro ends, I enter VBE, and the editor is
completely unresponsive. All I get is a beep if I try to click on
anything. I can't even exit VBE. The only way to restore the VBE is
to completely close Excel and restart it. Excel still works fine and I
can rerun the macro. Some of the macros that have caused this problem
are as simple as one that displays a basic user form that only has an
unload form instruction for it's cancel event click.

An example of the offending code is

Module1:

Option Explicit
Private Sub CommandButton1_Click()
Unload UserForm1
End Sub


UserForm1:

Option Explicit
Private Sub CommandButton1_Click()
Unload UserForm1
End Sub

UserForm1 is just a window with a button on it.

I'm using Excel 2002 running on Windows XP Professional.

Any ideas?



Tom Ogilvy

VBE freezes after running macros
 
Sounds like you are in edit mode in Excel. Go back to excel and click
another cell.

--
Regards,
Tom Ogilvy


" wrote:

I have been having a problem with the VBE editor freezing after I run
various VBA macros. I'll excecute a macro with VBE either open or
closed. After the macro ends, I enter VBE, and the editor is
completely unresponsive. All I get is a beep if I try to click on
anything. I can't even exit VBE. The only way to restore the VBE is
to completely close Excel and restart it. Excel still works fine and I
can rerun the macro. Some of the macros that have caused this problem
are as simple as one that displays a basic user form that only has an
unload form instruction for it's cancel event click.

An example of the offending code is

Module1:

Option Explicit
Private Sub CommandButton1_Click()
Unload UserForm1
End Sub


UserForm1:

Option Explicit
Private Sub CommandButton1_Click()
Unload UserForm1
End Sub

UserForm1 is just a window with a button on it.

I'm using Excel 2002 running on Windows XP Professional.

Any ideas?



[email protected][_2_]

VBE freezes after running macros
 
Indeed, an open cell does cause the same symptom, but I have the
problem when I am not in edit mode.

Two additional symptoms:

1. Excel remains functional.
2. After visiting the unresponsive VBE, if I go back to Excel, the bar
along the top of the Excel window is dimmed as if the Excel were not my
active window. It remains dimmed even as I type into cells in Excel.

I must be doing something stupid, but I can't figure out what it is!


dvyg725

VBE freezes after running macros
 
dweis wrote on 04/25/2006 13:37 ET :
I have been having a problem with the VBE editor freezing after I run
various VBA macros. I'll excecute a macro with VBE either open or
closed. After the macro ends, I enter VBE, and the editor is
completely unresponsive. All I get is a beep if I try to click on
anything. I can't even exit VBE. The only way to restore the VBE is
to completely close Excel and restart it. Excel still works fine and I
can rerun the macro. Some of the macros that have caused this problem
are as simple as one that displays a basic user form that only has an
unload form instruction for it's cancel event click.

An example of the offending code is

Module1:

Option Explicit
Private Sub CommandButton1_Click()
Unload UserForm1
End Sub


UserForm1:

Option Explicit
Private Sub CommandButton1_Click()
Unload UserForm1
End Sub

UserForm1 is just a window with a button on it.

I'm using Excel 2002 running on Windows XP Professional.

Any ideas?

did you ever figure out what this was? I have the same problem


All times are GMT +1. The time now is 09:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com