I believe there's a check for it as part of the Workbook object
if(wb.ReadOnly) then
       msgbox "........."