Macro that selects read only any time excel opens

Magoosball

Board Regular
Joined
Jun 4, 2017
Messages
70
Office Version
  1. 365
I have moved my excel personal macro workbook to a shared drive and have created a shortcut into the XLSTART folder for everyone on my team. This way whenever I update one of my macros it updates everyone on my teams at the same time across multiple computers.

I am running into a problem because anyone who opens excel is getting the message box that states the workbook is currently open by another user would you like to continue as read only.

Is it possible to write a script that will automatically select read only on the personal workbook whenever excel is opened up and this message box appears?


Thank you in advance!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Have you tried the following:

Application.DisplayAlerts = False

Remember to set it to true after the file opens though.
 
Upvote 0
How would I make sure that this script fires anytime excel is opened? The read only message box appears the moment excel is opened.
 
Upvote 0
In VBA, where it says ThisWorkbook, use the following:

Private Sub Workbook_Open()
Application.DisplayAlerts = False
End Sub
 
Upvote 0
Solution
I am still getting this message box when excel opens. Not sure what I could be doing wrong
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,561
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top