Ok, so heres the problem:

I am in the process of making a HTML editor, and I have a tool which (at the moment) converts tag case to uppercase or lowercase. The only problem is it also converts the attributes as well, which I don't want. Does anyone know how to ignore the attributes and change the case for the rest of the tag? I have included the source code that I am currently using below (for uppercase).

Oh, and btw, I'm a newbie, so plz give me some code (or tell me where I can find some) rather then tell me what vb function to use.

Thanks,

Tom
[email protected]

Here's the current code:

Code:
Sub TagUCase()
Dim txt As String
Dim tag_open As Integer
Dim tag_close As Integer
On Error GoTo ErrorHandler
rchEditor.Visible = False
Screen.MousePointer = vbHourglass
txt = rchEditor.Text
tag_close = 1
Do
tag_open = InStr(tag_close, txt, "<")
If tag_open = 0 Then Exit Do
tag_close = InStr(tag_open + 1, txt, ">")
If tag_open = 0 Then tag_close = Len(txt)
rchEditor.SelStart = tag_open - 1
rchEditor.SelLength = tag_close - tag_open + 1
rchEditor.SelText = UCase(rchEditor.SelText)
rchEditor.SelStart = 0
Loop
rchEditor.Visible = True
Screen.MousePointer = vbNormal
rchEditor.SetFocus


ErrorHandler:
rchEditor.Visible = True
Screen.MousePointer = vbNormal
Exit Sub
End Sub