Listbox Selected Item to TextBox

J

JP

Hi. I have a listbox in a form. I will to put the selectedItem text of
listbox in a textbox, can I do that?, how?. Thanks a lot.
 
S

Sue Mosher [MVP-Outlook]

VBA user form or Outlook custom form? You posted in both the VBA and forms groups, so we have no way of knowing. Multi-select or single-select list box?
 
J

JP

I have a user form in Outlook. In it I have a ComboBox ( I was mistaken when
I said ListBox, excuse me ) with a multiple items. My objective is: when you
select an item of the ComboBox, pass the text in the item to a textbox in
the same form. Thanks.




"Sue Mosher [MVP-Outlook]" <[email protected]> escribió en el mensaje
VBA user form or Outlook custom form? You posted in both the VBA and forms
groups, so we have no way of knowing. Multi-select or single-select list
box?
 
S

Sue Mosher [MVP-Outlook]

On a VBA user form, that would look like this:

Private Sub ComboBox1_Change()
TextBox1.Value = ComboBox1.Value
End Sub

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


JP said:
I have a user form in Outlook. In it I have a ComboBox ( I was mistaken when
I said ListBox, excuse me ) with a multiple items. My objective is: when you
select an item of the ComboBox, pass the text in the item to a textbox in
the same form. Thanks.

"Sue Mosher [MVP-Outlook]" <[email protected]> escribió en el mensaje
VBA user form or Outlook custom form? You posted in both the VBA and forms
groups, so we have no way of knowing. Multi-select or single-select list
box?

JP said:
Hi. I have a listbox in a form. I will to put the selectedItem text of
listbox in a textbox, can I do that?, how?. Thanks a lot.
 

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