如果你的目的只是将2.5+3.6替换成25/10+36/10
没有必要这复杂,整这么多循环。这么多循环应当是里面设置的问题。
你看一下下面的代码
[code:9800a89dc3]
Private Sub Command1_Click()
b = 0
s = Text1.text & " "
For i = 1 To Len(s)
m = Mid(s, i, 1)
Select Case Asc(m)
Case 48 To 57
Text2.text = Text2.text + m
If b > 0 Then b = b + 1
Case 46
b = 1
Case Else
If b > 0 Then
Text2.text = Text2.text & "/" & 10 ^ (b - 1)
End If
Text2.text = Text2.text + m
b = 0
End Select
Next
Text2.text = Trim(Text2.text)
End Sub
[/code:9800a89dc3]