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 / September 2005

Tip: Looking for answers? Try searching our database.

List and ComboBoxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Torey - 07 Sep 2005 23:10 GMT
I went through the basic UserForm tutorial on the Word MVP site. (Extremely
helpful!!). I wanted to use a listbox to have users chose 'Mr., Mrs., Ms' in
the form. I don't know about arrays and all that.  What is the simplest way
to populate the list with these unchanging choices.

Thanks,
Torey
Jonathan West - 08 Sep 2005 00:44 GMT
>I went through the basic UserForm tutorial on the Word MVP site. (Extremely
>helpful!!). I wanted to use a listbox to have users chose 'Mr., Mrs., Ms'
>in the form. I don't know about arrays and all that.  What is the simplest
>way to populate the list with these unchanging choices.

Put the following into the UserForm_Initialize event of your UserForm

Private Sub UserForm_Initialize()
 ListBox1.List = Array("Mr.", "Mrs.", "Ms.", "Dr.")
End Sub

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org 

Torey - 08 Sep 2005 02:59 GMT
Thank You!!

>>I went through the basic UserForm tutorial on the Word MVP site.
>>(Extremely helpful!!). I wanted to use a listbox to have users chose 'Mr.,
[quoted text clipped - 6 lines]
>  ListBox1.List = Array("Mr.", "Mrs.", "Ms.", "Dr.")
> End Sub
 
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.