bconner
05-06-2010, 10:39 AM
I am using the code below to remove quotes from a text file but it bombs out on the Red Highlighted section below.... Can someone help me
Dim nLength As Long
Dim sData As String
Close #1
'Get the file length.
Open "\\addfile00\Groups\Billing\Dictionaries\Rejections.txt (file://\\addfile00\Groups\Billing\Dictionaries\Rejections.txt)" For Binary As #1
nLength = LOF(1)
Close #1
sData = Space(nLength)
Open "\\addfile00\Groups\Billing\Dictionaries\Rejections.txt (file://\\addfile00\Groups\Billing\Dictionaries\Rejections.txt)" For Binary As #1
Get 1, 1, sData
sData = Replace(sData,"""," ")
nLength = Len(sData)
sData = Replace(sData, "Press <Return> to continue, or press <F7><Q> to quit: " & vbCrLf, "")
sData = Replace(sData, "COMPLETED" & vbCrLf, "")
sData = Left(sData, Len(sData) - 2) & String(nLength - Len(sData), " ") & vbCrLf
Put 1, 1, sData
Close 1
Dim nLength As Long
Dim sData As String
Close #1
'Get the file length.
Open "\\addfile00\Groups\Billing\Dictionaries\Rejections.txt (file://\\addfile00\Groups\Billing\Dictionaries\Rejections.txt)" For Binary As #1
nLength = LOF(1)
Close #1
sData = Space(nLength)
Open "\\addfile00\Groups\Billing\Dictionaries\Rejections.txt (file://\\addfile00\Groups\Billing\Dictionaries\Rejections.txt)" For Binary As #1
Get 1, 1, sData
sData = Replace(sData,"""," ")
nLength = Len(sData)
sData = Replace(sData, "Press <Return> to continue, or press <F7><Q> to quit: " & vbCrLf, "")
sData = Replace(sData, "COMPLETED" & vbCrLf, "")
sData = Left(sData, Len(sData) - 2) & String(nLength - Len(sData), " ") & vbCrLf
Put 1, 1, sData
Close 1