1

In my listbox the strings are longer than the listbox width.

I cannot change the listbox width because of the already made up surface design:

enter image description here

Is there a VBA property for the listbox to:

break the string in half and display it on more than one line

or

scroll horizontally, to see the whole string

If there's not that kind of property, I'd like to know of other ideas.

4
  • What happens if you insert a return character CHR(13) or CHR(10)? Perhaps insert that if a length exceeds a certain amount? Commented Mar 18, 2019 at 15:30
  • 1
    Is that a Form Control or an ActiveX Control? Commented Mar 18, 2019 at 15:30
  • 1
    @AndyG ActiveX Control Commented Mar 18, 2019 at 15:31
  • @PGCodeRider Good idea, ill try that...let you know if it works Commented Mar 18, 2019 at 15:33

1 Answer 1

2

The ListBox is single line only and does not support line breaks.

If it is an ActiveX then it has a property called ColumnWidths. Set it to something bigger like 500 and you will see a scrollbar at the bottom of the ListBox.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.