Editing and adding items to a listbox

S

Sophie

Hello all,

I am new to VBA, have built a userform for word template with two list
boxes with several option items. However, in future some of this text
might not be needed. So I am trying to get the user to edit old
items, add new items and sometimes add but without storing in the
listbox. Is it possible that on click of an edit button a text box pops
up to allow such actions? I really don't know how to go about this
using the edit.

here is part:
Private Sub UserForm_Initialize()
With lstBox1
.AddItem ""
.AddItem "letter"
' .AddItem "appointment"
etc.....
'End With

With lstBox2
.AddItem ""
.AddItem"today"
etc...
End With
End Sub

Private Sub OK_Click()

With ActiveDocument
.Bookmarks("bmk_Subjectref").Range.Text = lstBox1.Value
.Bookmarks("bmk_SDate").Range.Text = lstBox2.Value
End With
''Application.ScreenUpdating = True
Unload Me
End Sub

-- thanks--
Sophia
=====
 

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