how to apply programming in design mode

P

Peter

Hello,

I have added a listbox and done the following programing:

Private Sub ListBox1_Click()

ListBox1.AddItem ("Item1")
ListBox1.AddItem ("Item2")
ListBox1.AddItem ("Item3")

End Sub

When I go into the word doc and exit design mode, nothing happens. I would
expect the Sub routine to run and fill the listbox. What step(s) am I
missing?

Thanks,
Peter
 
K

Karl E. Peterson

Peter said:
I have added a listbox and done the following programing:

Private Sub ListBox1_Click()

ListBox1.AddItem ("Item1")
ListBox1.AddItem ("Item2")
ListBox1.AddItem ("Item3")

End Sub

When I go into the word doc and exit design mode, nothing happens. I
would expect the Sub routine to run and fill the listbox. What
step(s) am I missing?

Well, is an instance of the form loaded and visible?

Did you click the listbox?
--
 
P

Peter

I'm not sure what you mean by "an instance of the form loaded" but I did try
to click on the listbox and nothing happens. When I put it back into design
mode I can get to the properties by clicking the listbox, but nothing happens
when clicking it after exiting design mode.

Do I have to turn on any VBA options or macros for the programing to take
effect?
 

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