![]() |
Why is my UserForm event procedure disapeared?
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? |
Why is my UserForm event procedure disapeared?
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. Sam Kuo wrote: 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? -- Dave Peterson |
Why is my UserForm event procedure disapeared?
Hi Dave
I guess I can only do so for now. Thanks again! Sam "Dave Peterson" wrote: 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. Sam Kuo wrote: 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? -- Dave Peterson |
All times are GMT +1. The time now is 10:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com