VBE freezes after running macros

D

dweis

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?
 
G

Guest

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.
 
D

dweis

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top