ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to display the first Item in a combobox as the default item (https://www.excelbanter.com/excel-programming/379061-re-how-display-first-item-combobox-default-item.html)

Nigel

How to display the first Item in a combobox as the default item
 
Try setting the L:istIndex value to 1

--
Cheers
Nigel



"Jeffery B Paarsa" wrote in message
...
Hello,

I am initilizing and adding about 15 items from a range to a combo box
before I display the userform. Instead of showing blank inside of combo
box
when I display the user form, I would like to set the first item as the
default item when showing userform. I tried to set the Topindex to 1, 0
but
it does not accept it.
--
Jeff B Paarsa




Nigel

How to display the first Item in a combobox as the default item
 
Oops sorry set it to 0 (or of course any valid value in the list!

--
Cheers
Nigel



"Nigel" wrote in message
...
Try setting the L:istIndex value to 1

--
Cheers
Nigel



"Jeffery B Paarsa" wrote in message
...
Hello,

I am initilizing and adding about 15 items from a range to a combo box
before I display the userform. Instead of showing blank inside of combo
box
when I display the user form, I would like to set the first item as the
default item when showing userform. I tried to set the Topindex to 1, 0
but
it does not accept it.
--
Jeff B Paarsa






Bernie Deitrick

How to display the first Item in a combobox as the default ite
 
Jeffrey,

UserForm1.ComboBox1.ListIndex = 0

HTH,
Bernie
MS Excel MVP


"Jeffery B Paarsa" wrote in message
...
I am sorry I don't see ListIndex parameter on the property of my ComboBox!
How do you set this ListIndex? I can only see the TopIndex on the property
of my Combobox!
--
Jeff B Paarsa


"Nigel" wrote:

Try setting the L:istIndex value to 1

--
Cheers
Nigel



"Jeffery B Paarsa" wrote in message
...
Hello,

I am initilizing and adding about 15 items from a range to a combo box
before I display the userform. Instead of showing blank inside of combo
box
when I display the user form, I would like to set the first item as the
default item when showing userform. I tried to set the Topindex to 1, 0
but
it does not accept it.
--
Jeff B Paarsa








All times are GMT +1. The time now is 03:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com