View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pflugs Pflugs is offline
external usenet poster
 
Posts: 167
Default Refedit Retaining Focus

I created a userform that contains a RefEdit, several textboxes, and a 'Done'
button. The form is initialized with the RefEdit as the focus. The form
also has a checkbox that when clicked modifies the width to reveal a second
set of controls.

Sometimes when I click 'Done' to close the form, the RefEdit's selection
retains control. That is, the status bar says "Point" and the ants are
marching around the selection. When this happens, the macro continues to run
and Excel becomes confused and eventually crashes.

I'm not sure why this is happening. I have even used
"Application.CutCopyMode = False" on Terminate, and that doesn't seem to take
care of all problems. I have also tried cleaning the code with Rob Bovey's
Code Cleaner. Any other suggestions?

Thanks,
Pflugs