Allow users to add items to list box

R

Randy

How do I set up an ActiveX control list box to allow the user to add items to the list?
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

I have never found a reason to use an ActiveX control in a document.
However, it you have a command button on the document that runs the
following code, an input box will be displayed into which the user can add
an item and when they click the OK button on the input box, the item will be
added to the listbox

Dim Message, Title, NewItem
Message = "Enter the item that you want to add to the list." ' Set
prompt.
Title = "Add Item" ' Set title.
NewItem = InputBox(Message, Title)
If Len(NewItem) > 0 Then ListBox1.AddItem NewItem


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
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