We help IT Professionals succeed at work.
Get Started

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

Last Modified: 2019-05-26
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?
Watch Question
Consultant and developer
This problem has been solved!
Unlock 1 Answer and 22 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE