Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to kill the zipped files in C:\Document and Settings\LogginName\Temp\ using code for this strange Problem Yuvraj Excel Discussion (Misc queries) 2 May 2nd 09 06:52 PM
Recent Files used - Excel 2000 Doug Mc New Users to Excel 6 September 4th 05 10:01 AM
Saving Excel 2000 files as .xml MS[_5_] Excel Programming 1 July 30th 04 03:10 PM
Help files for Excel 2000 steve Excel Programming 2 October 23rd 03 03:57 PM


All times are GMT +1. The time now is 12:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"