Respond to a Display Alert

  • Thread starter Thread starter Dave
  • Start date Start date
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
 
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
 
thanks, I used this to work

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