troubleshooting Question

Listbox needed that can be filtered into various smaller lists in userform for MS Word

Avatar of marrick13
marrick13 asked on
* arrays* userformsVBAMicrosoft Word
22 Comments1 Solution116 ViewsLast Modified:
I have a project whereby I want to show a list of items (about 180) that represent Word shape names or descriptions so that I can select any one of them and have the code create that shape in the Word document. I also want to add option buttons to the userform that can filter that list according to shape categories such as “Basic Shapes”, “Flowcharts”, “Callouts”, etc. (about 10 such filters). I believe I would need a three-dimensional array to populate the listbox, with the first column being the shape name/description, the second the shape category, and the third the VBA shape enumerator, so I can use that in the code that creates the shape in the document (but I want the listbox to show only the name/description). Clicking one of the option buttons would then filter the listbox to show only the shape name/descriptions in that category, and selecting an item will then assign its shape enumerator to a variable that I can then use in the code that creates the shape.

Arrays are great but I am not at all good at creating them, and I’ve been unable to find examples online that I can adapt for this project. Can someone give me a start here?
Neil Fleming
Consultant and developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 22 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 22 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros