Macro to create X number of items based on user input

T

teach2click

I've created a simple Word template to track meeting/conference call
action items. However, one user might have just 3 items to enter while
another has 15, etc., so I have a macro (add_item) that will paste the
brief table (including fields) for an additional item.

I'd like the user to be prompted at the beginning with an Input Box to
enter how many items they will be entering. The add_item macro would
then repeat that number of times. I know just enough VBA to be
dangerous so I'm struggling with this.

Thanks!
 
D

Doug Robbins - Word MVP

Easier to tell you exactly how to incorporate into your existing code if you
had showed it, but something like

Dim i as Long, j as Long
i = InputBox("Enter the Number of Items")
For j = 1 to i
'Your code
Next

--
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