vb Code:
'in Private Sub cmdForward_Click() ...
If InStr(1, LCase(Mid$(sHTMLDocument, Text1.SelStart, lSelLength)), "<!--", vbTextCompare) > 0 Then
lNewIndex = InStr(Text1.SelStart + lSelLength - 4, LCase(sHTMLDocument), "-->", vbTextCompare) + 3:
If lNewIndex < (Text1.SelStart + lSelLength - 4) Then lNewIndex = 0
GoTo ReCheck
End If
' If InStr(1, LCase(Mid$(sHTMLDocument, Text1.SelStart, lSelLength)), "<style ", vbTextCompare) > 0 Or _
' InStr(1, LCase(Mid$(sHTMLDocument, Text1.SelStart, lSelLength)), "<style>", vbTextCompare) > 0 Then
' lNewIndex = InStr(Text1.SelStart + lSelLength - 9, LCase(sHTMLDocument), "</style>", vbTextCompare) + 9: GoTo ReCheck
' End If