PDA

Click to See Complete Forum and Search --> : Retaining userform inputs


bluehawk
Mar 24th, 2004, 11:51 AM
I have a user form that asks user input, i.e., the recipient name. The code then inserts the recipient name into the document. However, when the document is saved and then reopened, the fields reset.

For example, if the user inputs Joe Blow as a recipient name, how do I keep Joe Blow in the userform the next time the document is opened.

Thanks



:confused:

manavo11
Mar 24th, 2004, 03:29 PM
I don't understand. The data isn't shown in the document when you add it there or in the input form you have?

bluehawk
Mar 25th, 2004, 05:25 AM
Let's try another example:

The userform asks for an address to be inserted into a memo.

The user inputs the address: 123 Abc St., NY, NY (among other info, i.e., names, telephone number, recipient, issuer, date, etc..)

The address (and other info) gets inserted into a Word memo

The user saves and closes the memo.

Now he reopens the document because the address should have been Xyz St. instead of Abc St.

The userform opens up. (This is where I'm having trouble).

The userform that opens up after having been saved, doesn't show the 123 Abc St., NY, NY. It's blank. He either needs to reinput the entire field or make the changes in the word doc.

The problem is that there are many input fields - so the only option is to make the changes in the Word doc.

Is there any way to retain the previous inputs in the userform after it's closed? And have the Userform opened with the previous input already pre-populated. In my example above, having the userform show 123 Abc., NY, NY already prepopulated the next time the user reopens the document.

Hopefully, this is more clear.

Thx

manavo11
Mar 25th, 2004, 02:43 PM
Maybe when you save the data you can also save it in the registry or in a file so when you load it up again, you get the data from there?