Open to modify

K

kardifflad

I'm hoping this is an easy one for someone.
I have a macro that writes data to an archive sheet every time a butto
is pressed. This works fine.
However I now want the archive sheet viewable to everyone but onl
updateable by either the marco or a password.
to do this i have saved the Archive with a password to modify. That wa
users can open as read only. However i do not know what addition i nee
to make to my macro for it to open the Archive to add data to it.
So for instance i currently have:

Workbooks.Open (ExcelFileB), Password:= "12345"

but this is no help with the read only setting. I thought perhaps i
would be a simple Workbooks.Modify, password "12345". or something lik
that.

can anyone help please?
PS this is Excel 200
 
G

GS

Try...

Workbooks.Open (ExcelFileB), Password:= "12345", ReadOnly:=False

...since it is one of the args for the Open method. It would serve you
well to get familiar with the Object Browser!!!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 
K

kardifflad

thank you for this, although its not quite addressing the problem. bu
this could be my fault in not having the write to document set as rea
only
 
G

GS

thank you for this, although its not quite addressing the problem.
but this could be my fault in not having the write to document set as
read only.

What about applying sheet protection? This requires users to enter a
password in order to edit content. VBA can edit if you set it up
correctly and lock the project.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 

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