Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill Files in Excel 2000
Tested this one under Excel 2000 and it seems to work okay. Did you perform a step-through already? "AJM1949" schreef in bericht ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to kill the zipped files in C:\Document and Settings\LogginName\Temp\ using code for this strange Problem | Excel Discussion (Misc queries) | |||
Recent Files used - Excel 2000 | New Users to Excel | |||
Saving Excel 2000 files as .xml | Excel Programming | |||
Help files for Excel 2000 | Excel Programming |