A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I set up a combobox on word?



 
 
Thread Tools Display Modes
  #1  
Old November 10th, 2005, 04:33 AM
omolano
external usenet poster
 
Posts: n/a
Default How do I set up a combobox on word?

Im trying to create a form using the control box, but I don't know how to
populate the comboBox in word.
  #2  
Old November 10th, 2005, 05:27 AM
Jay Freedman
external usenet poster
 
Posts: n/a
Default How do I set up a combobox on word?

On Wed, 9 Nov 2005 20:33:02 -0800, "omolano"
wrote:

Im trying to create a form using the control box, but I don't know how to
populate the comboBox in word.


You have to write VBA (macro) code in the Document_New and
Document_Open procedures.

The simplest method, if the contents of the list will always be the
same, is to use something like

Private Sub Document_New()
With ComboBox1
.AddItem "one"
.AddItem "two"
' etc.
.ListIndex = 0
End With
End Sub

You'd need the same thing in Document_Open, because the combo box
doesn't store the list in the document file when the document is
closed.

If you need to get values from a database, see the combo box part of
the article at
http://msdn.microsoft.com/library/de...dc_activeX.asp

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
take yet another lesson from wordperfect "reveal codes" wordperfect is superior General Discussion 5 May 11th, 2009 07:58 PM
Specific text placement Nospam New Users 9 October 11th, 2005 01:23 AM
how do i set up template in vbeditor without proggramming language ARRRGH New Users 4 October 1st, 2005 03:19 AM
Continuous breaks convert to next page breaks Jennifer Hunt General Discussion 2 December 30th, 2004 05:45 PM
How to change merge forms from Word Perfect to Microsoft Word Charles Kenyon General Discussion 1 December 30th, 2004 03:35 PM


All times are GMT +1. The time now is 12:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.