I am trying to remove the line numbers of a text document.
Example:
N10 G01 F720 X0Y0Z0
N20 X0Y0Z0
etc...
N9000 X0Y0Z0
M0
I can remove the line number on 1 line only but need to do this throughout the entire document.
Private Sub Command1_Click()
WordFoundFlag = 0
For i = 1 To Len(Text1)
Char = Mid(Text1, i, 1)
If Char Like "[A-Za-z-]" And WordFoundFlag = 0 Then
WordFoundFlag = 1
StartPos = i
ElseIf Char Like "[!A-Za-z-]" And WordFoundFlag = 1 Then
ElseIf Char Like "[!0-9]" And WordFoundFlag = 1 Then
GoTo BYE
End If
Next
BYE:
FindFirstWord = Mid(Text1, StartPos, i - StartPos)
Text1 = Replace(Text1, FindFirstWord, "")
End Sub