Hi,
I have a (rich text) textbox on one of my forms. I'd like the user to be able to use the enter key to go to a new line. As I found out the enter key does not normally behave that way in a textbox I am trying to solve this through vba code. I came as far as the following:
Private Sub mail_text_Enter()
mail_text.Value = mail_text.Value & "<br />"
mail_text.SetFocus
End Sub
which is wildly unsuccesfull as it only adds a line break at the end of the text (I don't know how to get the cursor position) and it doesn't even set focus back to the textbox.
I feel I'm going totally the wrong way about this. Does someone know how to do this?
thanks!
Jesse
I have a (rich text) textbox on one of my forms. I'd like the user to be able to use the enter key to go to a new line. As I found out the enter key does not normally behave that way in a textbox I am trying to solve this through vba code. I came as far as the following:
Private Sub mail_text_Enter()
mail_text.Value = mail_text.Value & "<br />"
mail_text.SetFocus
End Sub
which is wildly unsuccesfull as it only adds a line break at the end of the text (I don't know how to get the cursor position) and it doesn't even set focus back to the textbox.
I feel I'm going totally the wrong way about this. Does someone know how to do this?
thanks!
Jesse