Combo Box
This is a combobox from the control toolbox toolbar placed on a worksheet?
If yes, you can make the combobox show two columns in the list, but only one
boundcolumn will show up in the combobox.
Option Explicit
Sub auto_open()
With Worksheets("Sheet1").ComboBox1
.ColumnCount = 2
.BoundColumn = 1
.ListFillRange = ""
.Clear
.ColumnWidths = "25;55"
.AddItem "SD"
.List(0, 1) = "South Distance"
.AddItem "WD"
.List(1, 1) = "West Distance"
.AddItem "ND"
.List(2, 1) = "North Distancce"
End With
End Sub
I populated the combobox in the auto_open procedure--this goes in a General
module and will run each time you open your workbook.
But you could have done it manually through the properties window, too (with a
two column range somewhere in your workbook).
K wrote:
Hi, i have information in one of my excel spreadsheet combo Box
(please see below)
SD - South Distance
WD - West Distance
ND - North Distancce
is it possible that when i click drop down in combo box then i can see
all the information which i mentioned above and when i select one of
it like if i select SD - South Distance then after selecting it i just
see SD in combo box. I just want to see all information in dropdown
but i want first two words to show in combo box after selecting it.
Please if anybody can give any useful idea.
Thanks.
--
Dave Peterson
|