ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Read-Only alert when opening 2nd instance of Excel (https://www.excelbanter.com/excel-programming/377607-read-only-alert-when-opening-2nd-instance-excel.html)

[email protected]

Read-Only alert when opening 2nd instance of Excel
 
Does anyone have any pointers to suppressing the message "Personal.xls
is locked for editing" when opening a 2nd instance of Excel? I usually
run some pretty big reports during the day, and while they're running,
I'll have a Windows scheduled task try to open an Excel workbook with
some VBA in the Open event. This opens a 2nd instance of Excel, but it
won't actually execute until I hit the 'Read Only' button. I'd like to
bypass this alert altogether if possible.

I thought setting Application.DisplayAlerts = False in the Open event
of the XLS file being opened by the 2nd instance would work, but it
doesn't. Perhaps the 1st instance controls the value of DisplayAlerts?


Dave Peterson

Read-Only alert when opening 2nd instance of Excel
 
If you don't change personal.xls, you can use windows explorer to mark it
readonly.

Excel will respect that setting and won't even ask.

If you need to change something in personal.xls, close excel, remove the
readonly setting and make the changes--and then mark it readonly when you're
done.

wrote:

Does anyone have any pointers to suppressing the message "Personal.xls
is locked for editing" when opening a 2nd instance of Excel? I usually
run some pretty big reports during the day, and while they're running,
I'll have a Windows scheduled task try to open an Excel workbook with
some VBA in the Open event. This opens a 2nd instance of Excel, but it
won't actually execute until I hit the 'Read Only' button. I'd like to
bypass this alert altogether if possible.

I thought setting Application.DisplayAlerts = False in the Open event
of the XLS file being opened by the 2nd instance would work, but it
doesn't. Perhaps the 1st instance controls the value of DisplayAlerts?


--

Dave Peterson

[email protected]

Read-Only alert when opening 2nd instance of Excel
 
Dave, your suggestion works beautifully. Thanks so much for your help.

Dave Peterson wrote:
If you don't change personal.xls, you can use windows explorer to mark it
readonly.




All times are GMT +1. The time now is 07:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com