Outlook 2010 Populating a Text Box
Posted
by
Turkwise
on Stack Overflow
See other posts from Stack Overflow
or by Turkwise
Published on 2012-07-10T03:12:41Z
Indexed on
2012/07/10
3:15 UTC
Read the original article
Hit count: 109
all! I'll try to be as detailed as possible in describing my predicament. I have a little background knowledge in Visual Basic, but none really in VBA or VBscript in Outlook 2010. I'm working with Outlook 2010. I created a custom form (this is my first time). I have a combo box named ComboBox1 and a text box named TextBox1. I am trying to auto-populate TextBox1 with a number based on the selection made from ComboBox1 (ex. I select Value 1 from ComboBox1 and TextBox1 populates with 124). I made an attempt using this code in the Visual Basic Editor (VBA version 7.0):
Sub popBox()
If ComboBox1 = "Value 1" Then
TextBox1 = "124"
End If
End Sub
My question is what am I doing wrong? Should I be using the VBscript editor, or is using VBA the proper thing to do? Is what I am asking even possible? Thank you all in advance!
© Stack Overflow or respective owner