简体   繁体   中英

Force read-only prompt to “no” in Excel via VBA

I have an excel spreadsheet that are being used by multiple users. I saved it as read-only recommend prompt pop-up.

However, when I to use another program to open this file ( to refresh database and save the file ) , I still have to select read-only to 'No' from the prompt pop-up everytime.

How could I temporary enable the read-only prompt pop-up ?

Thank you.

if opening from excel ... this should do it

Application.DisplayAlerts = False
Workbooks.Open ("yourfile.xlsm"
Application.DisplayAlerts = True

if opening from elsewhere, perhaps you could just use a "stub" workbook or xla with the same 3 lines of code to get at yourfile.xlsm. Hope that helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM