![]() |
Run time error on Userform Show
I have a simple app - one userform that I call from a command button on the
spreadsheet. A couple of times - I run into an error message when trying to show the userform. Either a subscript out of range (I am not using subscripts) or a type mismatch error. I try renaming the form - no good. I try loading it then showing it - still no good. I got the following off of the website here - I named the form UserForm1 (very original I admit) - as soon as it gets to the load UserForm1 I get the subscript error. I have used other names - renamed the form - nothing works. I have run into this a couple of times before - Excel gets into a funk and will not recognize the form. The funny thing is that the code will work during the early stages of development - then I add a few more items to the form and it gets into this run time error thing. The MS website info addresses collections of userforms and getting this error - but I have only a single form I am trying to display. Any help is greatly appreciated - I tried all 3 of the "workarounds" as suggested on the MS website and none of them worked. |
Run time error on Userform Show
I would first rule out something on the form that might be botched during
the load event. You say the form works for a while and then you add more items and it happens....so it sounds like it's one of the controls or the data getting loaded into them. If you remove all of the controls and all of the code behind, then load the form, does it load? To narrow down the problem, remove each control one-by-one and try to load the form. "DonF" wrote in message ... I have a simple app - one userform that I call from a command button on the spreadsheet. A couple of times - I run into an error message when trying to show the userform. Either a subscript out of range (I am not using subscripts) or a type mismatch error. I try renaming the form - no good. I try loading it then showing it - still no good. I got the following off of the website here - I named the form UserForm1 (very original I admit) - as soon as it gets to the load UserForm1 I get the subscript error. I have used other names - renamed the form - nothing works. I have run into this a couple of times before - Excel gets into a funk and will not recognize the form. The funny thing is that the code will work during the early stages of development - then I add a few more items to the form and it gets into this run time error thing. The MS website info addresses collections of userforms and getting this error - but I have only a single form I am trying to display. Any help is greatly appreciated - I tried all 3 of the "workarounds" as suggested on the MS website and none of them worked. |
All times are GMT +1. The time now is 12:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com