Textbox as memo field, textboxes, memo, capitalization and more to come...
Textbox as memo field, textboxes, memo, capitalization and more to come...
Rate Textbox as memo field, textboxes, memo, capitalization and more to come...
(1(1 Vote))
' ===================================================================
' Split or brake a line when a user presses the ENTER KEY
' inside a text box during text entering.
' Also Capitalize every other word after the spacebar key was pressed
' ===================================================================
Dim position, _
longstring, _
whatchr, _
Count, _
Countinteger, _
leftsideofthestring
position = 1
whatchr = " "
longstring = Street_name.Text
leftsideofthestring = Left(longstring, InStr(position, ((longstring)), whatchr))
Do While InStr(position, ((longstring)), whatchr)
Dim leftstring, midstring, rightstring
position = InStr(position, longstring, whatchr) + 1
Count = Count + 1
If position <> 0 Then
leftstring = Left(longstring, position - 1)
midstring = UCase(Mid(longstring, position, 1))
rightstring = Mid(longstring, position + 1, Len(longstring))
longstring = leftstring & midstring & rightstring
End If
Loop
' ========================================
' Change the first character to upper case
' if it is not already in upper case...
' ========================================
longstring = UCase(Left(longstring, 1)) & Mid(longstring, 2, Len(longstring))
Street_name.Text = longstring
End Sub
Textbox as memo field, textboxes, memo, capitalization and more to come... Comments
No comments yet — be the first to post one!
Post a Comment