I want to create a small application. It will allow a user to create a worksheet and then process a column of data the user manually enters. The programs for each of the two processes have been written and work.
I have designed UserForm1; it has a ComboBox and Option Buttons for data entry and CommandButtons for selecting the process to run (BuildWS or LinkLessons) or Cancel. I have built some common subroutines because some steps in each process are identical (validate selection of a valid state and a grade in the active range). Even in the subroutine there are steps that are used multiple times so I placed these in their own subroutines.
My challenge is similar to Darren?s issue at ?Update userform after changes have been made on another userform?.
When a subroutine finds that no state code was entered, it executes cbStateCode.SetFocus. I want each of the subroutines above it to abort and exit, returning the program to UserForm1 with focus on the StateCode ComboBox.
How does an abnormal exit made from a sub routine that?s 2 or 3 or more levels down from the UserForm get relayed back up to it? Raise an ?error?? Use a public variable and code my own tests?
What other information would help you help me? I've attached a copy of my worksheet for this work in process.
TIA!