Suscript out of error Error handler

  • Hey guys,


    In a lot of my macros I use userforms that have drop down boxes - In these drop down boxes the list is compiled from a range. But then, if someone chooses to manually type something different and click Submit/Ok (which then runs another macro) I'll get the subscript out of range 9 error.


    Is there a basic error handler code I can add in to stop this from happening as I use a lot of different userforms and this happens for lots of things I use


    Essentially, I would like some generic error handler that can help the user from seeing the debug screen when entering a value into the userform that doesn't exist..


    Kind Regards,


    Julian

  • Re: Suscript out of error Error handler


    Change the style of the drop down to DropDownList... Then only an existing item can be selected.


    Error handling is a basic component of code, you should read this

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!