ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Default value of a List Box on a UserForm (https://www.excelbanter.com/excel-programming/337709-default-value-list-box-userform.html)

SailFL

Default value of a List Box on a UserForm
 
I have a List Box for a couple items on my UserForm. I want to use a default
value so that the user does not have to do anything if the current value in
the list box is correct. One example would be if the choice was enter State
information. If the default was FL, it would automatically get entered and
the user would not have to do anything.

How do you do this for just text boxes?

Thanks
--
SailFL

Andy Pope

Default value of a List Box on a UserForm
 
Hi,

Maybe you could use the .Value property once the listbox has been populated.

ListBox1.Value = "FL"

Cheers
Andy

SailFL wrote:
I have a List Box for a couple items on my UserForm. I want to use a default
value so that the user does not have to do anything if the current value in
the list box is correct. One example would be if the choice was enter State
information. If the default was FL, it would automatically get entered and
the user would not have to do anything.

How do you do this for just text boxes?

Thanks


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


All times are GMT +1. The time now is 07:48 AM.

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