Prevent Your VBA Code From Running While In Read-Only Mode

Prevent Your VBA Code From Running While In Read-Only Mode

I had an instance where I needed to prevent users from running a workbook's macros unless the workbook was editable (not read-only).  This file was used by multiple people and my colleagues were accidentally updating the workbook while somebody else was already in the file.  This poses a problem since the changes could not be saved if the file was Read-Only. 

Read More