Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2004

Tip: Looking for answers? Try searching our database.

Testing for Returns in a TextBox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rem - 24 Nov 2004 15:54 GMT
In a textbox, I would like to test whether the textbox
has multiple lines. However, I do not think the multiline
property is what I need to use to test for this because
what I really want to know is if the user has pressed
enter. Am I searching for carriage returns in the
textbox, then? If so, how do I do that?

Thanks for any help
Jonathan West - 24 Nov 2004 16:59 GMT
> In a textbox, I would like to test whether the textbox
> has multiple lines. However, I do not think the multiline
[quoted text clipped - 4 lines]
>
> Thanks for any help

Hi Rem

Try this

If InStr(TextBox1.Text, vbCr) > 0 Then
 MsgBox "user pressed Enter when typing text"
End If

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.