View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default 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