Open password protected file with macros

A

Alberto Ast

I have a password write protected file which i want to open with macros...
How do I do it so it will not ask me for the password?

I want others to open as read only so I force them pasword protecting my
file but then I need to open it to write with macros..

please help
 
B

Barb Reinhardt

you could unlock the cells they write to or unprotect and reprotect as you
run the code. Once protection is added to a worksheet, I think the code
creation is much more tedious.
 
A

Alberto Ast

Thanks Barb, I mean the file not a worksheet... I digged deeper into others
posts and find out what I needed.

From Dave Peterson i got the following

Workbooks.Open Filename:="C:\Settings.xls", _
Password:="1234", writerespassword:="qwer"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top