Passwords

azizrasul

Well-known Member
Joined
Jul 7, 2003
Messages
1,271
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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

6StringJazzer

Well-known Member
Joined
Jan 27, 2010
Messages
857
Office Version
  1. 365
Platform
  1. Windows
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).
 

azizrasul

Well-known Member
Joined
Jul 7, 2003
Messages
1,271
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?
 

6StringJazzer

Well-known Member
Joined
Jan 27, 2010
Messages
857
Office Version
  1. 365
Platform
  1. Windows
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.)
 

Watch MrExcel Video

Forum statistics

Threads
1,132,685
Messages
5,654,748
Members
418,149
Latest member
amamiche67

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
Top