En text1 en VB, hay "...tasdldjffhhkkghfgy... (que indica muchos caracteres)".
Subcomando privado1_Click()
Dim a As Long, b As Long, nStr As String
'Obtiene dos caracteres que comienzan con S:
p>a = InStr(Text1.Text, "s")
Si a > 0 Entonces
nStr = Mid(Text1.Text, 2)
MsgBox "Dos caracteres que comienzan con S=" & nStr
End If
'Obtiene los caracteres entre d y h:
a = InStr( Text1.Text, "d")
b = InStr(a + 1, Text1.Text, "h")
Si a > 0 y b > 0 entonces
nStr = Mid(Text1.Text, a + 1, b - a - 1)
MsgBox "Caracteres entre d y h=" & nStr
End If
Fin del subtítulo