The problem:
I have a textbox and a listbox on a user form. When the user clicks on an item in the listbox the description of that item will appear in the textbox (done by VBA). When the text in the description textbox is longer than the box can display, the vertical scrollbar does not appear until the user clicks on the box to position the cursor in it.
I have set the scrollbars property of the textbox to ScrollBarsVertical, WordWrap and MultiLine to True in the VBA editor. The code that populates the box is effectively
The line "Form.DescriptionTextBox.ScrollBars = fmScrollBarsVertical" seems to have no effect, whatever I set the scrollbars to doesn't seem to change the effect described above. I even tried setting the selection to the last part of the box contents briefly to make it scroll downwards and then setting it back to the top, and that didn't work either.
If I can't fix this behaviour of textboxes, should I be using a different control or just living with the problem?
I have a textbox and a listbox on a user form. When the user clicks on an item in the listbox the description of that item will appear in the textbox (done by VBA). When the text in the description textbox is longer than the box can display, the vertical scrollbar does not appear until the user clicks on the box to position the cursor in it.
I have set the scrollbars property of the textbox to ScrollBarsVertical, WordWrap and MultiLine to True in the VBA editor. The code that populates the box is effectively
Code:
Form.DescriptionTextBox.Locked = False
Form.DescriptionTextBox.Text = Description
Form.DescriptionTextBox.ScrollBars = fmScrollBarsVertical
Form.DescriptionTextBox.Locked = True
If I can't fix this behaviour of textboxes, should I be using a different control or just living with the problem?