Control Objects, and populating a Combo Box

  • Thread starter cmonroe21 via OfficeKB.com
  • Start date
C

cmonroe21 via OfficeKB.com

Okay, I feel stupid. I need to be able to populate my combo box on a Vba
custom userform. I can do it in Outlook Developer, and have figured it out
in other developers easily, but I can't seem to do it in Vba editor without
getting an error. I've tried using a string array, I've tried using .AddItem
and .Items.Add, and I tried using .RowSource, and adding individual strings
using a With statement. I also found a .List and tried to use that, but I'm
not sure if that's right. Thing is none of these methods work, I think
because I need to create a control object and then set it equal to my control
so I can access my control? I don't know!

Set oComboBox = oPage.Controls("ComboBoxName")

but I don't know how to create oPage, or what to set it to (I'm using a Vba
Project, not the outlook developer), and not sure whether to create oComboBox
as a .Object or .Control.

Once I can get access to the control maybe I'll stop getting the error
"Object required" ??? Then I might be able to figure it out myself?

Please help!
 
C

cmonroe21 via OfficeKB.com

Oh goodness, see, I knew I should feel stupid! I just figured it out. I was
putting the code in the ThisOutlookSession Application Startup, not the
UserForm Initialize. Oops! It's working now! At least I know a ton of ways
to populate a combo box now! ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top