Hello,
I created a "pause" button on my userform that allows the user to temporarily stop filling out the form and resume at a later time. The issue I am having is that when the user saves and closes the excel file, and reopens it, the data is lost on the userform.
The pause button runs off of a userform.hide command, and works when the file remains open. Is there another way of managing this capability, while ensuring the patially completed userform saves the information until the user completes and submits the data?
Thanks
GSurge
You can't save a userform's input when the workbook is closed. The input must be saved to say a hidden sheet & retreived when re-opening
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Hi,
When you close Excel it will clear the userform info. What you need to do is when you Click the "Pauses" button to have the info stored some where and then if you close Excel and reopen it you can have the form reload the info.
Charles
There are other ways to do this, this is but 1 !
Be Sure you thank those who helped.
IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.
Great. Can you please help me the code for that?
Do you have an example of how the code should look? I am very new at VBA....
Hi,
The code would be similar to your code(if you have it) that when you want the data to be transferred from the form to the worksheet. The only difference is it will go to a hidden sheet.
And when you re open Excel you will have the userform initialize (filed in) when the form is call up to be used.
Charles
There are other ways to do this, this is but 1 !
Be Sure you thank those who helped.
IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.
I understand the transfer to the hidden worksheet, but could you provide an example/further explanation of how to get the data back into the userform when the form is restarted after excel is opened?
Just reverse the code that posts to the sheet
[me.textbox1.value= "cell that has value in it"[/code]
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks