Share via

TextBox with Scroll Bars

Anonymous
2011-02-02T21:33:08+00:00

My goal is to create a replacement for MsgBox or drawing TextBox.  If the information is in a column (with vbCrLf separating the items) I need a verical scroll bar to move up and down.  If the information has a very long string of characters with no vbCrLfs, I need a horizontal scroll  bar to move back and forth.

I am almost there.  I:

  1. Went to Insert on the Developer Tab and picked ActiveX TextBox
  2. Clicked in the TextBox and selected Properties
  3. Set muliline to TRUE, Scrollbars to BOTH and linkedcell to A1

If I fill A1 with lots of text separated by ALT-ENTERs, the verical scrollbar will appear when needed.  However if I fill A1 with a single long stream of text with no ALT-ENTERs.  The TextBox will wrap the text rather than display a horizontal scrollbar.

Clearly, there is some other Property that I am not setting correctly.  I am a novice at userforms.  Any assistance would be appreciated. 


gsnu201101

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2011-02-02T21:49:19+00:00

Word Wrap false?


Microsoft® MVP PowerPoint® since 2007.

Web Page: PowerPoint Alchemy Hints and Tips

Was this answer helpful?

0 comments No comments

Answer accepted by question author

Anonymous
2011-02-02T21:43:23+00:00

Try setting the WordWrap property to False.


NOTE: Please mark the message or messages (yes, you can mark more than one) that answer your question as the "Answer" so that others will know your question has been resolved.

Was this answer helpful?

0 comments No comments

7 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Anonymous
    2011-02-02T21:46:57+00:00

    Oh, by the way, if you set the HideSelection property to False, the scroll bars will remain visible when the TextBox is not selected.


    NOTE: Please mark the message or messages (yes, you can mark more than one) that answer your question as the "Answer" so that others will know your question has been resolved.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-02-02T21:43:27+00:00

    If you undo the multiline setting, that will make the horizontal scroll bar appear.  Not sure what happens in the situation with all the vbCrLF - you'll just have to experiment.

    HTH,

    Eric

    Was this answer helpful?

    0 comments No comments