Kill Files in Excel 2000

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Tested this one under Excel 2000 and it seems to work okay.
Did you perform a step-through already?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top