Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Permission denied code 70 on killfile

Useing the following
Sub KillFile()
Dim myFileName As String
myFileName = "C:\Parade\zzz.txt"
SetAttr myFileName, vbNormal
Kill myFileName ----- this line is yellow in debug
End Sub
Looking thru web could not find answer any help greatly appreciated
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Permission denied code 70 on killfile

Curt,

There's nothing wrong with the code. Are you sure that's the correct path?
What error message you getting?

Mike

"Curt" wrote:

Useing the following
Sub KillFile()
Dim myFileName As String
myFileName = "C:\Parade\zzz.txt"
SetAttr myFileName, vbNormal
Kill myFileName ----- this line is yellow in debug
End Sub
Looking thru web could not find answer any help greatly appreciated
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Permission denied code 70 on killfile

Run-time error '70':
Permission Denide

This is caused when the file you are trying to delete is in use by some one
else.


"Curt" wrote:

Useing the following
Sub KillFile()
Dim myFileName As String
myFileName = "C:\Parade\zzz.txt"
SetAttr myFileName, vbNormal
Kill myFileName ----- this line is yellow in debug
End Sub
Looking thru web could not find answer any help greatly appreciated
Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Permission denied code 70 on killfile

Permission Denied error code 70
This same code is working in some other places.
In properties of file (zzz) type of file txt document opens with notepad
Location: C:\Parade


"Mike H" wrote:

Curt,

There's nothing wrong with the code. Are you sure that's the correct path?
What error message you getting?

Mike

"Curt" wrote:

Useing the following
Sub KillFile()
Dim myFileName As String
myFileName = "C:\Parade\zzz.txt"
SetAttr myFileName, vbNormal
Kill myFileName ----- this line is yellow in debug
End Sub
Looking thru web could not find answer any help greatly appreciated
Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Permission denied code 70 on killfile

New to this there is no one else useing it is not on ?(server or whatever) So
if I follow you correcly it means another macro or part of program is
causeing this. If I am correct how would I find this hang up? Is there a way
when a part of program is run to disconnect use of this file to eliminate
this. Your answer about use is best I've had to understand.
Thanks

"Kent Prokopy" wrote:

Run-time error '70':
Permission Denide

This is caused when the file you are trying to delete is in use by some one
else.


"Curt" wrote:

Useing the following
Sub KillFile()
Dim myFileName As String
myFileName = "C:\Parade\zzz.txt"
SetAttr myFileName, vbNormal
Kill myFileName ----- this line is yellow in debug
End Sub
Looking thru web could not find answer any help greatly appreciated
Thanks

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
CopyFolder Permission Denied, but who by? DartGuru Excel Programming 0 April 27th 07 09:05 AM
permission denied SandyR Excel Programming 2 November 16th 05 01:53 PM
Permission to use object denied. Shannon Excel Programming 3 November 18th 04 11:41 PM
Permission to use object denied WilDeliver[_2_] Excel Programming 2 October 22nd 04 07:46 PM
Permission Denied Audrey Ng Excel Programming 1 October 1st 03 07:20 AM


All times are GMT +1. The time now is 08:31 PM.

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"