Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
A Simply ComboBox Selection returns value to TextBox
I have a userform with a simply ComboBox named (cboAtty) who's ROWSOURE
PROPERTIES are =Data!A2:A30, with a SHEET Called Data, with info on A2:B30, The info is a Name Listing in Column A, with Bar# in Column B)(A2:B30). On the userform is COMBOBOX called cboAtty & a TEXTBOX called (tbBar) Here is my Code that always fails: Private Sub cboAtty_Change() tbBar.Value = Application.VLookup(cboAtty.Value, Sheet1.Range("A2:B30"), 2, False) End Sub Objective is to return the cell info In Column B based on ComboBox selection of Column A. Into my TextBox. I don't know what Value Sheet1 has, weather it's empty of same data, seems to not matter. Thanks on this.. I'm just stuck, read all the posts... still to no avail. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
A Simply ComboBox Selection returns value to TextBox
Hi,
This definitely works for me: Private Sub cboAtty_Change() tbBar.Value = Application.VLookup(cboAtty.Value, Worksheets("Data").Range("A2:B30"), 2, False) End Sub "thom hoyle" wrote: I have a userform with a simply ComboBox named (cboAtty) who's ROWSOURE PROPERTIES are =Data!A2:A30, with a SHEET Called Data, with info on A2:B30, The info is a Name Listing in Column A, with Bar# in Column B)(A2:B30). On the userform is COMBOBOX called cboAtty & a TEXTBOX called (tbBar) Here is my Code that always fails: Private Sub cboAtty_Change() tbBar.Value = Application.VLookup(cboAtty.Value, Sheet1.Range("A2:B30"), 2, False) End Sub Objective is to return the cell info In Column B based on ComboBox selection of Column A. Into my TextBox. I don't know what Value Sheet1 has, weather it's empty of same data, seems to not matter. Thanks on this.. I'm just stuck, read all the posts... still to no avail. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
A Simply ComboBox Selection returns value to TextBox
Worked like a charm, Thank you Toppers... seems my code was screwed up...
"Toppers" wrote: Hi, This definitely works for me: Private Sub cboAtty_Change() tbBar.Value = Application.VLookup(cboAtty.Value, Worksheets("Data").Range("A2:B30"), 2, False) End Sub "thom hoyle" wrote: I have a userform with a simply ComboBox named (cboAtty) who's ROWSOURE PROPERTIES are =Data!A2:A30, with a SHEET Called Data, with info on A2:B30, The info is a Name Listing in Column A, with Bar# in Column B)(A2:B30). On the userform is COMBOBOX called cboAtty & a TEXTBOX called (tbBar) Here is my Code that always fails: Private Sub cboAtty_Change() tbBar.Value = Application.VLookup(cboAtty.Value, Sheet1.Range("A2:B30"), 2, False) End Sub Objective is to return the cell info In Column B based on ComboBox selection of Column A. Into my TextBox. I don't know what Value Sheet1 has, weather it's empty of same data, seems to not matter. Thanks on this.. I'm just stuck, read all the posts... still to no avail. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
fill combobox depending on selection from another combobox | Excel Discussion (Misc queries) | |||
ComboBox linked to TextBox | Excel Discussion (Misc queries) | |||
combobox /textbox value | Excel Discussion (Misc queries) | |||
Userform: Textbox changing with selection in combobox (list) | Excel Programming | |||
Userform ComboBox and TextBox help!!! | Excel Programming |