windwardkey
New Member
- Joined
- Dec 9, 2017
- Messages
- 13
I have an foreign language learning program. Simplified a little, on a user form I designate a verb, e.g., “buy” and click “start.” A sub randomly selects a person, e.g., “I”, “you,” or “they,” puts the English in cell (2, 2) and the Italian in cell (3, 2), and then calls a sub named “tense().” That sub randomly selects from among “present,” “imperfect,” and “future,” and puts the English verb in cell (2, 3) and the Italian in cell (3, 3) It also puts information in cells (2, 1) and (3, 1), like “Today” if present tense has been selected and “Tomorrow” if future tense. That sub ends by calling “closing.” That adds a direct object in cells (2, 4) and (3, 4) and posts the complete English sentence on the user from, e.g., “Today I am buying a car,” or “Tomorrow they will buy a car.” I then type the Italian sentence in a space on the form, and then click “check answer,” and another form shows my sentence next to the correct Italian sentence.
Here’s the problem. When the sub “closing” reaches “End Sub” the program acts as if there was either a line with Call Tense or one calling one of the specific tenses. Typically it then decides to stop after 2 to 6 iterations. The result is a mishmash—“Yesterday they will buy a car,” or Tomorrow I used to buy a car.”
How can I make the program stop at the end of the last sub? I’ve tried to solve the problem by a “Stop,” but that closes the userform.
Here’s the problem. When the sub “closing” reaches “End Sub” the program acts as if there was either a line with Call Tense or one calling one of the specific tenses. Typically it then decides to stop after 2 to 6 iterations. The result is a mishmash—“Yesterday they will buy a car,” or Tomorrow I used to buy a car.”
How can I make the program stop at the end of the last sub? I’ve tried to solve the problem by a “Stop,” but that closes the userform.