Solved

Run time error 70: Permission denied

Posted on 2002-03-20
10
1,363 Views
Last Modified: 2011-09-20
Dear Experts:

i have a VB program it will perform create txt file and copy image file function using filesystem object.
however the program will show me the following error message:

 "Run-time error '70'

 Permission denied"

i had checked all the files and folders, they are not read only.
and i logon as admin with full control of the machine.

what could be the cause of this problem and the solution?
Thanks in advance for helping me to solve this problem.
0
Comment
Question by:wolvering
10 Comments
 
LVL 2

Expert Comment

by:nahumd
Comment Utility
Which line causes the error ?
0
 

Author Comment

by:wolvering
Comment Utility
not sure,i run the exe file in NT.  I think it is the WinNT configuration problem.  what setting could cause this error to occur? as i run the program smoothly in win98.
0
 
LVL 2

Expert Comment

by:nahumd
Comment Utility
Try to create this file manually in the destination directory and see it you can do it.

0
 

Author Comment

by:wolvering
Comment Utility
Yes i can create files or folder manually
0
 
LVL 2

Expert Comment

by:nahumd
Comment Utility
Well first we must identify the line code that caused the error.
You can either install vb there, or use error handling in your code to identify it, or try to remove the suspected offending line and see if it removes the error.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:wolvering
Comment Utility
i am sure it is not the problem of program code because i tested the program in different OS.  this problem happen only in that particular machine with NT installed.
so i am quite sure it is the NT setting problem instead of program code.
0
 
LVL 9

Accepted Solution

by:
Valliappan AN earned 100 total points
Comment Utility
Check if you have something to do with Scripting Access. Hope your system can control if Windows Scripting is allowed or not. Since, FSO needs Windows Scripting to be in Windows, to run through.

If you'd like to look at:
http://www.sarc.com/avcenter/venc/data/win.script.hosting.html

Cheers
0
 

Expert Comment

by:sweetpillow
Comment Utility
Hi,

   Here is the reason why this error come out :

You tried to write to a write-protected disk, to access a locked file, or to use UNLOCK on a file that was not locked.

POSSIBLE SOLUTIONS:

Remove write-protection from the disk.

Unlock the file before attempting access.

Lock the file before trying to unlock it.

Remove the UNLOCK statement.

Insert error checking to test for disk/file status before attempting WRITE or UNLOCK operations.

Cheers,
Sweetpillow :)
0
 

Expert Comment

by:GuruVB
Comment Utility
Try using "Name" function from VB. Before you try make sure that you have closed the file.

I hope this will help you
0
 
LVL 5

Expert Comment

by:RainUK
Comment Utility
Are you using APIs to access the file?
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now