Generating fields based on user provided number

  • Thread starter SunshineStateBroker
  • Start date
S

SunshineStateBroker

Good morning,
My employees use a standard document to produce reports for our clients and I
am looking for a way to shorten the amount of time it takes them to
accomplish this feat.
They start with a template with some standard verbiage at the top and below
that is where the fields start. There are a few questions for each field and
the number of fields changes from report to report,
Example:
------------------------
Name of Employee:
Date of hire:
Pay Rate:
Production Value:
-------------------------
Right now, my employees copy and paste the above stated fields as many times
as they need to, but I was hoping there could be a macro that prompts them
when they open the document to enter the number of fields they need and have
the program auto generate them.
Any help would be greatly appreciated.
 
D

Doug Robbins - Word MVP

The way that I would do this would be to use a userform with text boxes for
each of the Name of Employee, Date of Hire, Pay Rate and Production value.
It would have a command button which would add the data entered into each of
those text boxes into a Listbox on the userform, after which it would clear
the list boxes so that they are ready for the details of the next employee
to be added. There would also be a command button, which if clicked on,
would transfer and item from the listbox to the textboxes so that the data
could be edited if necessary, and another one to allow the user to delete an
item from the list box. Finally there would be another command button,
which the user would use when they were satisfied with the data to transfer
all of the information from the listbox into the document in the required
format. You could also have a "spin-up, spin-down" button to allow you to
vary the order in which the employee records are displayed in the userform
and hence the order in which they are entered into the document.

To get started, see the following pages of fellow MVP Greg Maxey's website:

http://gregmaxey.mvps.org/Create_and_employ_a_UserForm.htm

http://gregmaxey.mvps.org/Populate_UserForm_ListBox.htm





--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top