Multiline in a textbox in outlook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello!

I have a textbox in a userform I wrote in VBA in outlook.
I want people to be able to write a message of a few lines in the textbox.
The property Multiline is TRUE, but still, when I press 'enter' it goes to
different controls and does not go to the next line.
How can I fix it?

Thanks,
Yonina.
 
Yes, it works, but I can't ask the people here (users) to use Ctrl+Enter
every time they want to enter a newline. Is there a way to fix it in the code?
 
Use the Advanced Properties property page and set the EnterKeyBehavior
Boolean to True. That will do what you want.

The behavior of that property is described in the help for MS Forms 2.0,
which is the control set used in Outlook forms. You can add a reference to
that library in your Outlook VBA project so you can use the Object Browser
and Object Browser Help with it.

From that Help on EnterKeyBehavior:

The EnterKeyBehavior and MultiLine properties are closely related. The
values described above only apply if MultiLine is True. If MultiLine is
False, pressing ENTER always moves the focus to the next control in the tab
order regardless of the value of EnterKeyBehavior.

The effect of pressing CTRL+ENTER also depends on the value of MultiLine. If
MultiLine is True, pressing CTRL+ENTER creates a new line regardless of the
value of EnterKeyBehavior. If MultiLine is False, pressing CTRL+ENTER has no
effect.
 
THANK YOU!!!
IT WORKS!!!

:) :) :)

Ken Slovak - said:
Use the Advanced Properties property page and set the EnterKeyBehavior
Boolean to True. That will do what you want.

The behavior of that property is described in the help for MS Forms 2.0,
which is the control set used in Outlook forms. You can add a reference to
that library in your Outlook VBA project so you can use the Object Browser
and Object Browser Help with it.

From that Help on EnterKeyBehavior:

The EnterKeyBehavior and MultiLine properties are closely related. The
values described above only apply if MultiLine is True. If MultiLine is
False, pressing ENTER always moves the focus to the next control in the tab
order regardless of the value of EnterKeyBehavior.

The effect of pressing CTRL+ENTER also depends on the value of MultiLine. If
MultiLine is True, pressing CTRL+ENTER creates a new line regardless of the
value of EnterKeyBehavior. If MultiLine is False, pressing CTRL+ENTER has no
effect.
 
Back
Top