对不起,是我看错,函数改为:
Public Function GetString(Expression As String) As String
Dim strValue As String
Dim AscCode As Integer
Dim Msg As String
Dim i As Integer
Dim L As Integer
Dim strValue1 As String
Msg = Expression
L = Len(Expression)
For i = 1 To L
strValue = Mid$(Msg, i, 1)
AscCode = Asc(strValue)
If AscCode <> 32 Then
strValue1 = strValue1 & strValue
End If
Next
GetString = strValue1
End Function
楼上的,我用妳的代码试了一下,得到的结果为:
“avcddccdsfsd sdfsdfsdf,ds”,你能解释一下吗?
Public Function GetString(Expression As String) As String
Dim strValue As String
Dim AscCode As Integer
Dim Msg As String
Dim i As Integer
Dim L As Integer
Dim strValue1 As String
Msg = Expression
L = Len(Expression)
For i = 1 To L
strValue = Mid$(Msg, i, 1)
AscCode = Asc(strValue)
If AscCode <> 32 Then
strValue1 = strValue1 & strValue
End If
Next
GetString = strValue1
End Function
楼上的,我用妳的代码试了一下,得到的结果为:
“avcddccdsfsd sdfsdfsdf,ds”,你能解释一下吗?
[此贴子已经被作者于2007-2-3 20:56:26编辑过]