Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Very dumb question about initializing combo box that uses array

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chowgirl - 31 Jan 2006 23:35 GMT
Here's the code I'm using to populate some very simple comboboxes with
hard-coded items:

Private Sub ComboBox1_Change()
ComboBox1.List = Array("Functional", "Look and feel", "Usability",
"Performance", "Operational", "Maintenance", "Security", "Legal",
"Other")
End Sub

Private Sub ComboBox2_Change()
ComboBox2.List = Array("1", "2", "3", "4", "5")
End Sub

Private Sub ComboBox3_Change()
ComboBox3.List = Array("1", "2", "3", "4", "5")
End Sub

The trouble is, when I close and re-open the .dot or .doc, the
comboboxes are empty. Do I have to use something other than array, such
as AddItem (or whatever it is)?

Thanks.
Greg Maxey - 31 Jan 2006 23:43 GMT
Put it in a UserForm Initialize routine

Private Sub UserForm_Initialize()
Me.ComboBox1.List = Array("Functional", "Look and feel", "Usability", _
"Performance", "Operational", "Maintenance", "Security", "Legal", _
"Other")
End Sub

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> Here's the code I'm using to populate some very simple comboboxes with
> hard-coded items:
[quoted text clipped - 18 lines]
>
> Thanks.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.