![]() |
Combobox selection to fill in textboxes
I have a combobox that I want to select a value which will then fill
textboxes with values from the column 2, column3 , etc. Column 1 Column 2 Column 3 Last Name First Name Nickname Dungate Deborah Deb Dungate Dominique Dom I should get: Last Name: Dungate First Name: Deborah Nickname: Dom I am using: Private Sub ComboBox1_Change() TextBox50.Value = Combobox1.Column(1) TextBox51.Value = Combobox1.Column(2) End Sub I get the error: "Could not get the column property. Invalid Property" Can someone help me with the error. What code do I sue |
Combobox selection to fill in textboxes
I believe you will need to use the List property of the combobox.
TextBox50.Value = Combobox1.List(0, 1) 'first row, first col of CB "Tdungate" wrote: I have a combobox that I want to select a value which will then fill textboxes with values from the column 2, column3 , etc. Column 1 Column 2 Column 3 Last Name First Name Nickname Dungate Deborah Deb Dungate Dominique Dom I should get: Last Name: Dungate First Name: Deborah Nickname: Dom I am using: Private Sub ComboBox1_Change() TextBox50.Value = Combobox1.Column(1) TextBox51.Value = Combobox1.Column(2) End Sub I get the error: "Could not get the column property. Invalid Property" Can someone help me with the error. What code do I sue |
All times are GMT +1. The time now is 04:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com