Public Sub VBLineNumbersRemoveSample()
'See also:
' VBLineNumbersRemove Function
' VBUtilitiesSample Subroutine
Const strFn = "VBLineNumbersRemoveSample"
Dim strInFile As String
strInFile = InputBox("Input file: ({Esc} cancels.)", strFn, "\Entisoft\Tools\Samples.Txt")
If Len(strInFile) = 0 Then Exit Sub
Dim strOutFile As String
strOutFile = GetTempFileName(Null, strFn)
strOutFile = InputBox("Output file: (FILE WILL BE OVERWRITTEN; {Esc} cancels.)", strFn, strOutFile)
If Len(strOutFile) = 0 Then Exit Sub
Dim intOutdentNonProgLines As Integer
Select Case MsgBox("Outdent non-program lines before adding line numbers? (i.e. has this file already had line numbers added to it with the ""indent non-program lines"" option?)", vbQuestion + vbYesNoCancel + vbDefaultButton2, strFn)
Case vbYes
intOutdentNonProgLines = True
Case vbNo
intOutdentNonProgLines = False
Case vbCancel
Exit Sub
Case Else
Stop
End Select
MsgBox "Return = " & VBLineNumbersRemove( _
vInFile:=strInFile, _
vOutFile:=strOutFile, _
vOutdentNonProgLines:=intOutdentNonProgLines _
) & " (True means success; False means failure.)", vbInformation, strFn
End SubCopyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.