View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] dweis@unm.edu is offline
external usenet poster
 
Posts: 1
Default 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?