回复:(ship118)回复:(slore)我只是给你演示如何...
Dim NextLine As StringDo Until EOF(1)
Line Input #1, NextLine
Lines = Lines & NextLine & Chr(13) & Chr(10)
Loop
Close #1
Text1.Text = Lines
Text1.Text = Replace(Text1.Text, " ", "")
Text1.Text = Replace(Text1.Text, "G41", "M32M37")
Text1.Text = Replace(Text1.Text, "G40", "")
Text1.Text = Replace(Text1.Text, "M08", "")
Text1.Text = Replace(Text1.Text, "M07", "M36M00")
Text1.Text = Replace(Text1.Text, "M02", "M34M45M30")
Do While InStr(1, Text1, vbCrLf & vbCrLf)
Text1.Text = Replace(Text1.Text, vbCrLf & vbCrLf, vbCrLf)
Loop
End Sub
现在我已经实现到这里了,但是怎么能在每行前面加上“N0002,N0004......”呢?代码是什么啊。