Prevent Vba Code From Running While In Read Only Mode

less than 1 minute read

Sub ReadOnlyCheck() Dim Answer As Long 'Check to see if file is Read-Only If ThisWorkbook.ReadOnly = TRUE Then Answer = MsgBox("Someone Is currently editing this file And your changes will Not be saved. " _ & "Do you wish To proceed?", vbYesNo, "Read-Only File") If Answer = vbNo Then Exit Sub End If
End Sub

Tags: developer

Categories: vba

Updated: March 19, 2017

Twitter Facebook LinkedIn

1 minute read

Here’s the simple steps to highlight the row and column of the selected cell which can be extremely useful when navigating large sets of data. Here’s a littl…

less than 1 minute read

How it Works Using SEARCH and ISNUMBER When you need to check if a cell contains specific text (or string) we need to combing the SEARCH and ISNUMBER functio…

less than 1 minute read

So you have a 0% value on one of your data labels and want to hide it?

1 minute read

Download the example workbook here: calculate-time-between-dates.xlsx

Leave a Comment