• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 530
  • Last Modified:

Debugging help needed: Run-time error '70': Permission Denied

Can someone help me debug the attached.  What I have for Command4_Click() works perfectly.  I have just copied this and changed the import specification and table name for Command12_Click().  When I run Command12_Click(), I receive Run-time error '70': Permission Denied
  • 2
1 Solution
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
When in Debug mode, after it generates the error and the yellow bar is over the File Copy line, mouse over strInputFileName and strFileTemp and make sure they are correctly formatted paths and file names.

If mousing over doesn't work, the go into your Immediate Windows (Ctrl-G), type ?strInputFileName {return} and ?strFileTemp  {return} to view what is in these variables.
kgittingerAuthor Commented:
Thank you very much
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Thanks for the grade.  Good luck with your project.  -Jim

btw I HIGHLY recommend you do this:
(1)  In any code window go to Tools:References
(2)  Set a reference to 'Microsoft Scripting Runtime', a.k.a. File System Object
(3)  In whatever free time you have play with the .FileExists and .FolderExists methods, as these will enable you to screen what the users enter for files, to make sure they are legit.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now