Why does VB6 add a single quote mark to beginning and end of each of the text files I am writing to and how can I prevent it?
Larry
Sample code:
Do While Not EOF(1) ' Loop until end of file.
Line Input #1, strLine ' Read line into variable.
strType = LTrim$(strLine)
strType = Left$(strType, 6)
strUIC = strType
strRSC1 = strType
Debug.Print "Line " & intLine & " is:" & strLine
Debug.Print "Type is:" & Left$(strType, 2)
Select Case Left$(strType, 1)
Case "("
Debug.Print "UESSR Code is :" & strRSC1
Debug.Print "strRSC is :" & strRSC
If strRSC1 <> strRSC Then
intRSCCount = intRSCCount + 1
Debug.Print "Writing " & 2 & " " & intRSCCount
Write #2, LTrim$(strLine)
Write #3, LTrim$(strLine)
Write #4, LTrim$(strLine)
strRSC = strRSC1
End If
Case "W"
intUICCount = intUICCount + 1
Debug.Print "Writing " & 3 & " " & intUICCount
Write #3, LTrim$(strLine)
intLineInput = Mid$(strLine, 48, 2)
Debug.Print "LineInputs is :" & intLineInput
If intLineInput < 1 Then
Write #4, LTrim$(strLine)
intBadCount = intBadCount + 1
End If
End Select
intLine = intLine + 1
txtCounter.Text = intLine & " of " & intLineCounter & " to Process"
Loop
Larry
Sample code:
Do While Not EOF(1) ' Loop until end of file.
Line Input #1, strLine ' Read line into variable.
strType = LTrim$(strLine)
strType = Left$(strType, 6)
strUIC = strType
strRSC1 = strType
Debug.Print "Line " & intLine & " is:" & strLine
Debug.Print "Type is:" & Left$(strType, 2)
Select Case Left$(strType, 1)
Case "("
Debug.Print "UESSR Code is :" & strRSC1
Debug.Print "strRSC is :" & strRSC
If strRSC1 <> strRSC Then
intRSCCount = intRSCCount + 1
Debug.Print "Writing " & 2 & " " & intRSCCount
Write #2, LTrim$(strLine)
Write #3, LTrim$(strLine)
Write #4, LTrim$(strLine)
strRSC = strRSC1
End If
Case "W"
intUICCount = intUICCount + 1
Debug.Print "Writing " & 3 & " " & intUICCount
Write #3, LTrim$(strLine)
intLineInput = Mid$(strLine, 48, 2)
Debug.Print "LineInputs is :" & intLineInput
If intLineInput < 1 Then
Write #4, LTrim$(strLine)
intBadCount = intBadCount + 1
End If
End Select
intLine = intLine + 1
txtCounter.Text = intLine & " of " & intLineCounter & " to Process"
Loop