ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel VBA - Userform combox problem (https://www.excelbanter.com/excel-programming/293646-excel-vba-userform-combox-problem.html)

thesteelmaker[_6_]

Excel VBA - Userform combox problem
 
How can i protect a combox, on a form, from unwanted data entry.

ie only being able to select whats in the list, and not enter other
text/numbers or leave blank.

Many thanks


---
Message posted from http://www.ExcelForum.com/


Mark Rosenkrantz[_2_]

Excel VBA - Userform combox problem
 
Steelmaker;

Userform1.combobox1.Locked = True

--
More Excel ? www.rosenkrantz.nl or
-------------------------------------------------------------------

"thesteelmaker " wrote in
message ...
How can i protect a combox, on a form, from unwanted data entry.

ie only being able to select whats in the list, and not enter other
text/numbers or leave blank.

Many thanks


---
Message posted from
http://www.ExcelForum.com/




Tom Ogilvy

Excel VBA - Userform combox problem
 
If a combobox from the control toolbox toolbar, look at the MatchRequired
property:

From help:

If the MatchRequired property is True, the user cannot exit the ComboBox
until the text entered matches an entry in the existing list. MatchRequired
maintains the integrity of the list by requiring the user to select an
existing entry.

--
Regards,
Tom Ogilvy


"thesteelmaker " wrote in
message ...
How can i protect a combox, on a form, from unwanted data entry.

ie only being able to select whats in the list, and not enter other
text/numbers or leave blank.

Many thanks


---
Message posted from http://www.ExcelForum.com/




thesteelmaker[_7_]

Excel VBA - Userform combox problem
 
Thank you both very much.
Nic

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 01:24 PM.

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