Passwords

azizrasul

Well-known Member
Joined
Jul 7, 2003
Messages
1,304
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
I have a MS Access db in which I want to open several MS Excel files that may or may not be password protected. I know that MS Excel files can have a password to open and modifiy a file and a password that protects worksheets. Is there any other password protection I need to be aware of to fully modify a MS Excel file using code?

n other words, I need to know which passwords the end user needs to supply me, on an MS Access form, in order to open a MS Excel file using VBA code.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
It is also possible to set passwords for specific ranges, although I don't think it's commonly used. It's also possible to give permissions to specific users, in which case a password won't help you (same link).
 
Upvote 0
The end user who will be using the MS Access db to open the MS Excel will have full ownership of these files.
So if I, in my MS Access table, containing the filepaths and filenames of the MS Excel files that end user wants to open and modify, if I add 4 new columns i.e.

Password to Open
Password to Modify
Worksheet Password
Range Password

Would this do the job?
 
Upvote 0
For a worksheet password, you would have to know which worksheet it was associated with. Same for range password. (I have not worked with range passwords in VBA so I am of limited help there.)
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,167
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top