View Single Post
  #4   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default How do I populate my combobox - I know...it's been asked.

If the Properties window is not displayed in the Visual Basic Editor, use
the View menu to display it. Then when you select the combobox on the
userform, its properties will be displayed in the Properties window. One of
those properties is the "Enabled" attribute of the control.

I still do not really understand how you are using this form. The form
should be in a template (.dot file) which should have an autonew macro in it
that calls the form. Then when you create a new document from the template,
that macro will run and cause the form to be displayed, which triggers the
Initialize event of the form to populate the combobox.

Actually, how do you know the rest are gone. Does nothing appear when you
use the down arrow on the combobox?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"lkgoldie" wrote in message
news
You truly are talking to a newbie.......How do I tell if the comboox is
enabled?

I save my document before closing (all information in my combobox is
there)
when I return to open the document only the first item in my combo box is
there and the rest are gone. When I go to look at the script/code it is
there
and I can run it again but I was looking for a way that when I reopen my
document after saving it that all information in my combo box stays.
Thanks
for any help!

Lisa

"Doug Robbins - Word MVP" wrote:

Is the combobox enabled?

When you say "save and reopen" do you mean use save, close and then use
FileNew and select the template containing the userform as the basis for
the new document?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"lkgoldie" wrote in message
...
I have reviewed other posts that mirror my hicup but I just don't seem
to
be
getting it!

I am using the following (as a general example)

Private Sub UserForm_Initialize()
' set up the combo box list
With ComboBox1
.AddItem "Jan"
.AddItem "Feb"
.AddItem "March"
.AddItem "April"
.AddItem "May"
.AddItem "June"
.AddItem "August"
.AddItem "Sept"
.AddItem "Oct"
.AddItem "Nov"
.AddItem "Dec"
.ListIndex = 0
End With
End Sub

All works fine till I save and reopen. Only Jan shows with the rest of
the
list gone. From what I have got....I did lower my macro security to MED
and
clicked the option of trust all...still have the problem.

I plan on using this script three times but w/ different information
(Months, Names and Locations). Is there a 'general' script line I can
use
to
make sure all of my combo box is saved and there when I reopen it?

Thanks
Lisa