combo Box programming
I have a Combo box list populated. What i am trying to achieve is when select a name from the list, i can have information about that nam populate a part of the spreadsheet. When i select a different name, i' like the old info to disappear and the information for the next nam appear. Any help would be much appreciated. Thanks guys, you've bee great in the past -- brett409 ----------------------------------------------------------------------- brett4098's Profile: http://www.excelforum.com/member.php...nfo&userid=451 View this thread: http://www.excelforum.com/showthread.php?threadid=26961 |
combo Box programming
Brett,
Do you have a table of data where the values in the combobox is the first column? Assuming so, and it has a name of say 'myTable', you can use VLOOKUP in VBA to get the data Set rng = Worksheets("Sheet1").Range("A1") With Combobox1 rng.Value = .Value rng.Offset(0,1).Value = Application.VLOOKUP(.Value, Range("myTable"),2,FALSE) rng.Offset(0,2).Value = Application.VLOOKUP(.Value, Range("myTable"),2,FALSE) End With Add this code into the combobox click event. -- HTH RP "brett4098" wrote in message ... I have a Combo box list populated. What i am trying to achieve is when i select a name from the list, i can have information about that name populate a part of the spreadsheet. When i select a different name, i'd like the old info to disappear and the information for the next name appear. Any help would be much appreciated. Thanks guys, you've been great in the past. -- brett4098 ------------------------------------------------------------------------ brett4098's Profile: http://www.excelforum.com/member.php...fo&userid=4519 View this thread: http://www.excelforum.com/showthread...hreadid=269611 |
All times are GMT +1. The time now is 01:10 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com