• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel Userform ComboBox/TextBox match

JPNess

New Member
Hi, this question may have been asked and answered.
I have a ComboBox on a userform which displays data off an excel spreadsheet, column C and there's corresponding data in column D.
When I make a selection in the ComboBox which is displaying data from column C, I'm looking to display the corresponding data from column D in a TextBox.
So far I've only been able to get the ComboBox and TextBox to match i.e. what I select in the ComBox shows up also in the TextBox.

Any advice?
 

Attachments

JPNess

New Member
Hi Belleke, thanks for the advice but it errors out - 'Could not get Column property. Invalid argument'.
Both of the columns (C and D) I mentioned are on a separate spreadsheet to where the userform initiates.
 

JPNess

New Member
This is what I've done so far;

>>> use code - tags <<<
Code:
Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = "TFO_SORs!ItemName"
End Sub

Private Sub ComboBox1_Change()
TextBox1.Value = ComboBox1.Value
End Sub
 
Last edited by a moderator:
Top