Respond to a Display Alert

D

Dave

I have a file that is protected with a password required to modify. When my
macro goes to open the file I receive a dispaly alert that it is recommended
that the file is opened read only with three options to choose from; yes, no,
cancel. Yes is the default but I want the macro to select NO. How can I do
this? Please see the line of code below

Workbooks.Open Filename:=MyFile, WriteResPassword:=My_PW
 
M

MichDenis

Hi Dave,

Have you tried this ?

Workbooks.Open Filename:=MyFile, ReadOnly:=Yes, WriteResPassword:=My_PW




"Dave" <[email protected]> a écrit dans le message de groupe de discussion :
(e-mail address removed)...
I have a file that is protected with a password required to modify. When my
macro goes to open the file I receive a dispaly alert that it is recommended
that the file is opened read only with three options to choose from; yes, no,
cancel. Yes is the default but I want the macro to select NO. How can I do
this? Please see the line of code below

Workbooks.Open Filename:=MyFile, WriteResPassword:=My_PW
 
D

Dave

thanks, I used this to work

Workbooks.Open Filename:=MyFile, IgnoreReadOnlyRecommended:=True,
WriteResPassword:=My_PW
 

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