Determine Workbook Mode

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The first line in this if-statement is incorrect. What would be the correct
syntax?

If ActiveWorkbook.Mode <> xlReadOnly Then
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly
End If
 
If Not ActiveWorkbook.ReadOnly Then
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top