[此贴子已经被作者于2016-4-7 17:10编辑过]
Dim i As Long, s As String i = Text1.SelStart '取光标位置 s = Text1.Text '取内容 If Len(s) = i Then '光标是不是在最后 s = s & "A" '如果是,直接加到最后 Else s = Left(s, i) & "A" & Mid(s, i + 1) '否则插到中间 End If Text1.Text = s '给值 Text1.SelStart = i + 1 '恢复光标位置