Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Bob W Bob W is offline
external usenet poster
 
Posts: 45
Default Making a UserForm that persists

The way a UserForm behaves is, it appears as you open a document from a
template. The user fills in the blanks, clicks on the commandbutton, and the
data he typed is populated throughout the document.

But if he discovers that he made a typo, there's no way to re-open the
userform and correct his entry...he has to start all over again.

Is there a way around this behavior, ie, a way to have the data he typed,
remain in the userform, and enable the userform to be re-opened and re-edited
unti the user is satisfied?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Making a UserForm that persists

Bob W wrote:
The way a UserForm behaves is, it appears as you open a document from
a template. The user fills in the blanks, clicks on the
commandbutton, and the data he typed is populated throughout the
document.

But if he discovers that he made a typo, there's no way to re-open the
userform and correct his entry...he has to start all over again.

Is there a way around this behavior, ie, a way to have the data he
typed, remain in the userform, and enable the userform to be
re-opened and re-edited unti the user is satisfied?


Of course there is. It just takes more planning and effort in setting up the
UserForm's code.

A UserForm appears when you open a document, only because there's a macro
named AutoOpen (stored in the document's template) that contains code to
show the UserForm. You can -- in addition or instead -- write another macro
that also shows the UserForm, and assign that macro to a toolbar button or
keyboard shortcut, or you can make it the entry macro of a form field (if
you're using a protected form).

The other part of this is to provide code -- in the launch macro or in the
UserForm's Initialize procedure -- to fill the UserForm's controls with the
data that's already in the document. That way the user can just edit the
specific items that need to change, instead of reentering everything.
Exactly how that code is written depends on how the information is
represented in the document, whether in bookmarks or form fields or document
variables or an external source (e.g., a database).

For specific questions about modifying an existing form, please post in the
newsgroup microsoft.public.word.vba.userforms
(http://www.microsoft.com/office/comm...a.userform s).

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform Template Bill d Microsoft Word Help 1 February 3rd 07 12:13 PM
Userform Sharpe Microsoft Word Help 1 March 17th 06 06:13 AM
Userform in word SuzieQ Microsoft Word Help 2 December 12th 05 09:42 PM
Userform - .Range_ Michelle Microsoft Word Help 1 December 8th 05 02:45 AM
creating a userform Jill D Microsoft Word Help 8 November 15th 05 07:25 PM


All times are GMT +1. The time now is 07:20 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"