Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

outlook 2010 combobox 2

Status
Not open for further replies.

Turtleman10

Technical User
Sep 13, 2012
40
US
I cant seem to populate my combobox. what do I need to set so I can additem. I think this is where I'm hung up.
 
The options need to be listed in the RowSource property.

As far as exactly how to get it in there, or what format you use, I'm clueless. I've never set up a combo box in an Outlook Userform before, so have never needed to do so.

Sorry I couldn't help more.

If you don't get an answer here, though, there is a site dedicated to Outlook specifically that might help:

And I believe there are others, that just happens to be the one I've seen most recently.


"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
yep thats the problem i'm running into. I dont know how to populate it in outlook. In excel I would just referance the cell. but in outlook I'm not quite sure how to do it. Thanks for the link.
 
OTTOMH without testing, have you tried using an array where you'd usually use an Excel Range.
 
Yes, albiet tested in Excel;

ComboBox1.List = Array("one", "two", "Three")
 
Can't provide specific help without seeing your code.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Yes, albiet tested in Excel;

ComboBox1.List = Array("one", "two", "Three")
Try it in Outlook. Any time I tried to set the RowSource via the properties or via code, I got an error message. I can't believe it's so picky for something that should be so simple. The Outlook combo box looks to be a TOTALLY different animal than the other Office products.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Yes and the book I have on outlook. Just tells you about it and how useful it can be but not how to code it. It's like they didnt know so they skimmed over that part. Thanks for the help I will give it a try and let you know what happens.
 
OK so I think I have this figured out Here is a sample of my code for other with this issue

Code:
Private Sub ComboBox1_DropButtonClick()

ComboBox1.AddItem "red"
ComboBox1.AddItem "red"
ComboBox1.AddItem "red"
ComboBox1.AddItem "red"
ComboBox1.AddItem "red"
ComboBox1.AddItem "red"

The most important thing about this is Location Location Location its probably the thing that messed me up the most. It needs to be under the DropButtonClick Method to work. Good luck.

 
User Form Outlook 2010
Just the two Controls, this is working for me;

Private Sub CommandButton1_Click()

ComboBox1.List = Array("one", "two", "three")
ComboBox1.ListIndex = 0

End Sub
 
This is working too;

Private Sub CommandButton1_Click()

ComboBox1.List = Array("one", "two", "three")
ComboBox1.AddItem "Ten"
ComboBox1.ListIndex = 0

End Sub
 
Thank you both for sharing your findings. Maybe it'll come in handy some day.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top