View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
AJM1949 AJM1949 is offline
external usenet poster
 
Posts: 31
Default Kill Files in Excel 2000

I have the following code which works fine in Excel 2002 and later, but wont
run in excel 2000.
Sub GovtPD()

On Error GoTo ErrorHandler

One:
Open "c:\Program Files\Mazda Quotemaster\GovtPD.txt" For Input As #1
Input #1, X
Close #1
X = X

Two:
Sheets(1).Range("GovtPD").Value = X
Open "c:\Program Files\Mazda Quotemaster\GovtPD.txt" For Output As #1
Write #1, X
Close #1

Exit Sub
ErrorHandler:
Select Case Err.Number
Case 53 'If Counter file does not exist...
X = InputBox("Enter Govt Predelivery Fee", "Create 'Pre
Delivery' File")
Resume Two
Case Else
Resume Next
End Select

End Sub
Sub ChangeGovtPD()
On Error Resume Next
Kill "c:\Program Files\Mazda Quotemaster\GovtPD.txt"
GovtPD
End Sub

Any suggestions as to why it does not work in Excel 2000 and how to fix it
would be greatly appreciated.

AJM1949