View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JW[_2_] JW[_2_] is offline
external usenet poster
 
Posts: 638
Default Determine Workbook Mode

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

Mike H. wrote:
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