Well guys, I have seen this asked before. About how to make text SubScript. As like H2O would be H²O (lower 2). I just wrote this for all yous that want it.
Treat it with care.
It's not the best.
But this gives you the idea.
Code:Private Sub SubScript(rtb As RichTextBox, SubString As String, Size As Integer) SubString$ = Mid$(Trim$(rtb.Text), InStr(rtb.Text, SubString$), Len(SubString$)) With rtb .SelStart = InStr(1, rtb.Text, SubString$) - 1 .SelLength = Len(SubString$) .SelFontSize = Size .SelText = SubString$ End With End Sub Usage Private Sub Command1_Click() Call SubScript(RichTextBox1, "MyString", 8) End Sub




.
Reply With Quote