|
-
Oct 8th, 2007, 12:34 AM
#1
Thread Starter
Lively Member
How to speed my code
Sir,
i am writing a program to convert text in my richtext box to another format.
For a = 1 To Len(frmEditor.RichText1.Text)
If Mid(frmEditor.txtMain.Text, a, 1) = "s" And Mid(frmEditor.txtMain.Text, a + 1, 1) = "s" And Mid(frmEditor.txtMain.Text, a + 2, 1) = "{" Then
txt = txt & "GR"
ElseIf Mid(frmEditor.txtMain.Text, a, 1) = "s" And Mid(frmEditor.txtMain.Text, a + 1, 1) = "s" Then
txt = txt & "LM"
ElseIf Mid(frmEditor.txtMain.Text, a, 1) = "s" And Mid(frmEditor.txtMain.Text, a + 1, 1) = "s" Then
txt = txt & "MT"
....................
..................
........................
...................
Else
txt = txt & Mid(frmEditor.txtMain.Text, a, 1)
Endif
above is an abstract of my code. what my problem is when converting large text it takes very much time. how can my speed up my program? i wan to check one character by character. please help....
raman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|