is there a way to customize data validation list Boxes?

G

Guest

is there a way to customize data validation list Boxes? For example can the
list box be made longer to show more of the listed items and be text
sensitive so keying the first letter of word will focus into the section of
the list containing similar words. Can the list box be changed use VBA?
 
G

Greg Glynn

This works

Sub MyWidth()

For x = 300 To 20 Step -20

UserForm1.Show

Next x

End Sub


So, I guess the answer is yes, you can vary the width with
UserForm1.ListBox1.Width = x
 
L

Leith Ross

Hello Allan,

If you are referring to a Worksheet Data Validation in cell Drop Down
for a list then answer is no. None of its properties or methods are
exposed through VBA and are under Excel's control.

As a workaround, you could use Active X ComboBoxes instead. This would
give you the formatting control you want, but at the expense of
writting a lot of VBA code to make it work. Depending on how many you
intend use, this could quickly become an undesirable solution.

Sincerely,
Leith Ross
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top