PDA

View Full Version : Solved: Inserting Drop Down Box + Link to other data



PJC
02-20-2009, 12:32 PM
I'm trying to insert a drop down box, which would contain a handful of items.

The user would 'double click' the appropriate item in the list which would then insert relevant document/text etc, perhaps from another source? This document would allow the user to input data etc.

Any suggestions for an inexperienced VBA coder? Thanks.

lucas
02-20-2009, 03:22 PM
You will need to be more specific. The biggest part of a project is to formulate your exact needs.

Most all of what you suggest is possible but not at the same time.

For instance, would insert relevant document/text, etc is not very specific.

Also things like, insert. Insert where? At the selection point, into a bookmark, etc.

Where does your handful of items come from? When they make a selection from the dropdown does it insert something besides what the dropdown says........that's what your post seems to indicate.

Is this dropdown going to be in a userform?

This document would allow the user to input data.......

Isn't that what we are doing here? If you mean additional data do you want the data to be input from the userform or after it closes?

Lots of questions. Best if you can start by deciding what you actually want to do and then ask questions here about each step....one at a time.

I could have just posted an example that does part of what you want but I would have been guessing.

PJC
02-21-2009, 04:52 AM
Thanks Lucas. It's not easy putting into words, but here goes.

I intend the word document to be a template. At the beginning of the template the user would see a 'drop down list' box. This would only contain 3 items within...say Option A, Option B, Option C.

The user would decide which Option they require and by selecting that option a preformatted table would be inserted in the template imediately below the drop down list. The preformatted table would contain fields that can be completed by the user.

If they selected Option A and also Option B each appropriate preformatted table would be inserted immediatley after each other.

I suppose what I'm trying to do is rather than a have a user copy and paste tables in from other docs it would be easier to have them select the table required from the 'drop down menu' and have it inserted automatically. Once inserted they would be able to add data/text to the table. Hope this clarifies.

lucas
02-21-2009, 10:18 AM
Maybe have the tables in the doc and delete the ones you don't want? A trick Gerry shared here some time back.
rough and quickly put together example.....ps I deleted all of the bookmarks added by the formfields to cut down on confusion.....so the only bookmarks left are the ones that surround the tables.

See if you can look at the code and figure out what is happening and ask questions here if you have any.

PJC
02-22-2009, 04:46 AM
Thanks Lucas. I think I've seen the light:doh: Rather than overcomplicate and have issues over user maintenance/changes etc...I'm going to go with the tables/data inserted, then delete if not required!

The simple option is often the best. Thanks again.