OFF97: How To Left Justify Cursor in TextBox Control (154900)



The information in this article applies to:

  • Microsoft Word 97 for Windows
  • Microsoft Excel 97 for Windows
  • Microsoft PowerPoint 97 for Windows
  • Microsoft Access 97

This article was previously published under Q154900

SUMMARY

In the Microsoft Office products listed at the beginning of this article, when you display a UserForm that contains a TextBox control, by default the cursor position in the TextBox control is indented. If you want the initial cursor position in the TextBox control to be left justified, you must set the SelectionMargin property of the TextBox to False.

MORE INFORMATION

To set the SelectionMargin property of the TextBox control, perform the following steps:

  1. From within the Visual Basic Editor, select the TextBox control that you have inserted on the UserForm.
  2. On the View menu, click Properties Window.
  3. In the Properties Window, click SelectionMargin.
  4. Select False from the drop-down list.
The next time that the UserForm is displayed, the initial cursor position will be left justified in the TextBox.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbProgramming KB154900