Hello
Ive only been learning VB for a half year now so my knowledge is very ...basic..., and I wrote this code to color all html tags (all words within < and >) within a rich text box in red...but I know its quite bad and I knew it wouldnt work when having ALOT of code...so can some of you pro's please improve it?
Thanks
VB Code:
Dim start_p As Long Dim end_p As Long For a = 1 To Len(RT.Text) If Mid(RT.Text, a, 1) = "<" Then start_p = a End If If Mid(RT.Text, a, 1) = ">" Then end_p = a RT.SelStart = start_p - 1 RT.SelLength = (end_p - start_p) RT.SelColor = RGB(255, 0, 0) End If Next a





..., and I wrote this code to color all html tags (all words within < and >) within a rich text box in red...but I know its quite bad and I knew it wouldnt work when having ALOT of code...so can some of you pro's please improve it?
Reply With Quote