We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Create dynamic list box entries on a userform for data in Excel 2007 and create word doc from it.

Medium Priority
548 Views
Last Modified: 2012-06-27
Hi,

I have an Excel 2007 spreadsheet with two columns of data. Column A has a letter type and Column B has a letter fragment.

What I would like to do is create a userform , in excel 2007,  which has a combox box with various letter types in it and a listbox . If you select a particular type of letter e.g. DV1 from the combobox the listbox brings up the relevant letter fragment options which you can then tick. A letter is then produced, using vba, from the options which you have selected.

Attached is a sheet with an example of the data.

Any help appreciated

Regards..
Fragment.xlsx
Comment
Watch Question

Joanne M. OrzechManager, Document Services Center
Top Expert 2004

Commented:
Why would you begin this process in Excel when you want to create a Word letter?  Wouldn't it just be easier to create the userform in Word?

Author

Commented:
Hi JOrzech,

The excel sheet contains all of my fragments and that is the source file. There are a large number of these and just thought it would be cleaner to keep everything in one place and dynaically create the word doc when required.

However I am open to suggestions.

Regards..

Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Commented:
BTW, ListBox1 needs to allow multiselect.

You might want to modify the code to check if the list box has anything selected before creating the word file.
Joanne M. OrzechManager, Document Services Center
Top Expert 2004

Commented:
LOL - I only know how to code Word so I would imagine that if you want to create a Word letter, you would start the process in Word.  You can always copy the Excel columns and paste into Word (which automatically creates a Word data source), but it looks like you have a viable solution posted by David251....

Just let me know if I can be of any assistance in this process regarding the Word end of it :)

Joanne Orzech
MS Word MVP
EE Zone Advisor

Author

Commented:
david251,

Sorry for not getting back to you sooner! Great soultion works a treat!

Regards..
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.