Why is my UserForm event procedure disapeared?

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

Dave Peterson

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.
 

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