R
Raj
Hi,
To avoid an alert being displayed when an open workbook is attempted
to be re-opened, I am using the following code:
On Error Resume Next
Application.DisplayAlerts = False
Workbooks.Open rspdir & rspstring1
This works fine and the alert display is suppressed. But the default
response of the alert ie. "Yes" pen the workbook is used. I want
the response "No" to be used ie. I do not want the workbook to be
opened again if the workbook is already open.
Can the default response of an alert be changed when the displayalerts
property is set to false?
If not, is there any other code I can use to open a workbook only if
it is not open?
Thanks in advance for the help.
Regards,
Raj
To avoid an alert being displayed when an open workbook is attempted
to be re-opened, I am using the following code:
On Error Resume Next
Application.DisplayAlerts = False
Workbooks.Open rspdir & rspstring1
This works fine and the alert display is suppressed. But the default
response of the alert ie. "Yes" pen the workbook is used. I want
the response "No" to be used ie. I do not want the workbook to be
opened again if the workbook is already open.
Can the default response of an alert be changed when the displayalerts
property is set to false?
If not, is there any other code I can use to open a workbook only if
it is not open?
Thanks in advance for the help.
Regards,
Raj