Public Function trimChars(s As String, StartPos As Integer, EndPos As Integer) As String
trimChars = Left(s, StartPos) & Mid(s, EndPos)
End Function
Private Sub Command1_Click()
Dim s As String
s = "123456789"
'现在删除456
MsgBox trimChars(s, 3, 7)
End Sub