Whats up guys! I am writing a small program that takes user inputs from a Userform, does some algebra with them, then spits out the data to a worksheet. I have a button (BACK) on the worksheet that is supposed to bring up the userform again in case a mistake was made and the user can go back and change an input. The problem is, after the numbers are changed and the user clicks the 'RUN' button again, it clears all information from the worksheet. The code works like this:
1. User enters information into userform. When he/she is done they click the 'RUN' button
2. The RUN button is a command button with code written that says to take the information and write them to cells in a worksheet.
3. In this worksheet I use excel's math functions to perform calculations.
4. Within the same code in the RUN button it then take the results of the calculations and writes them to a separate worksheet that is in a printable format.
5. The 'BACK' button code is simply "UserForm3.Show".
When the 'BACK' button is clicked the userform is shown and information can be edited, but when the RUN button is clicked again, all information from the worksheet is deleted. Does anyone have an idea why this is?
I tried to make this clear as possible but it's tricky to explain. Let me know if you have questions.
Bookmarks