Why is my UserForm event procedure disapeared?

  • Thread starter Thread starter Sam Kuo
  • Start date Start date
S

Sam Kuo

I have a UserForm_Initialize event procedure in the Forms module in VBE.

The problem now is, if I add any new form control (be a textbox, label or
whatever) to the userform, VBE then doesn't seem to recognise the UserForm as
an object in VBE (i.e. UserForm is no longer in the object dropdown list at
the top of the Forms module).

But if I delete the newly added form control, then the UserForm is back in
the object dropdown list again.

The project size is only 600KB so I don't think my work is over the size
limit.

I came across the same problem before, and was able to fix it by exporting
the troublesome form from the Project Explorer in VBE to somewhere, delete
the form in the troublesome workbook project, then import back the exported
form (as suggested by Dave Peterson). But somehow this doesn't work now...

Any ideas?
 
I have still never seen this happen. But maybe it's time to go back to a
working version of your file and recreate it.

It sounds like your file is corrupted and getting worse as time goes by.
 
Back
Top