Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Access connection prompting for a password. Error 70.

Access connection prompting for a password. Error 70.

Access connection prompting for a password. Error 70.

I have an email module in Access 2016 connecting to excel 2016 spreadsheet. The code calls Outlook. When I get to the following code block, I am prompted for a password:

The code sticks at FileCopy xlFile, sendFile

FileCopy xlFile, sendFile
Set xlapp = excel.Application
Set xlBk = xlapp.Workbooks.Open(sendFile)
xlBk.RefreshAll ' refreshall was not in the library
On Error Resume Next
For Each cn In xlBk.Connections

17 hours ago
The error where the code stops is Error 70, permission denied.

Thank you.


RE: Access connection prompting for a password. Error 70.

I am prompted for a password. I know of no write protection, nor do I know a password. I removed all passwords from my windows user account, I am still getting the error. I can modify the files, both access and excel files. I can save them. The password must have something to do with the connection, but I have no idea what.

Neither the Access file or the Excel file are protected in anyway. I have reviewed the Trust Center and there is no protection on either of these files.

Why am I being prompted for a password for this file, or the connection to the file?

RE: Access connection prompting for a password. Error 70.

You may have password in linked data in excel file, try it by opening excel file and refreshing links.


RE: Access connection prompting for a password. Error 70.

I found an loop error in a block of code and corrected it. The procedure no longer stops at FileCopy xlFile, SendFile, but I am still getting the error requesting the password for the admin account. I have removed all passwords from my local admin account, I have closed down my virus protection and firewall. I have checked both excel and access files for password protection (there is none in either program), I have checked the application's Trust Center.

The code runs but I am prompted for a password and after the email sent messagebox, I get a message box that says


"5: invalid procedure call or argument." 

I tried making a new connection using the Data Connecton Wizard in Excel. Under Data Link Properties, I am prompted for Data Source. I am not sure what it is asking for so I put the path to my access file in that input box. When i test the connection, I get the error


"Test connection failed because of an error in initalizing provider (provider is "Microsoft Office 16.0 Access Database Engine OLE DB Provider").  "The database has been place in a state by "Admin" on machine 'My machine name' that prevents it from being opened or locked." 
I had selected "Share Deny None' on the Advanced tab for Access Permissions.

RE: Access connection prompting for a password. Error 70.


I have to thank you for your attempt to resolve my problem. Someone suggested my access file was corrupted.
I created a new access file and imported all my objects into the new file... and the password issue went away.



Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close