Microsoft Office 2000/Visual Basic Programmer's Guide |
The following points provide suggestions for ways to enhance the performance of string operations:
Dim strText As String
strText = "this is a test"
Mid(strText, 11, 4) = "tent"
Debug.Print strText
Chr(13) & Chr(10)
.If Asc(strText) = 32 Then
The previous code is faster than the following:
If Left(strText, 1) = " " Then