I have this spreadsheet that was set up by someone who has now left my job and just wondering if some one here could help
most likely something simple but this is way over my head any head appreciated

VB Code:
  1. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  2. Dim i, j As Integer
  3. Dim texte As String
  4. Dim Wksht As Worksheet
  5.  
  6. On Error Resume Next 'Fermeture de Data Passdown
  7. Workbooks(Range("NameDataPassdown").Value).Close SaveChanges:=False
  8. On Error GoTo 0
  9. If Userallowed = False Then Exit Sub
  10. Application.ScreenUpdating = False
  11. If Range("Freeaccess").Value = True Then
  12. Or ActiveWorkbook.ReadOnly Then Exit Sub
  13. SortieSansEnregistrement = True
  14. Sheets("LOG").Select
  15. On Error Resume Next
  16. ActiveSheet.ShowAllData
  17. Range("RefID").End(xlDown).Select
  18. On Error GoTo 0
  19. Call Enregistrement 'Affichage feuille warning + enregistrement
  20. If MsgBox("Passdown is already saved." & Chr(10) & _
  21.     "Do you want to create a new copy in the Free To Use Folder ?" & Chr(10) & Chr(10) & _
  22.     "A copy must be created at the end of each shift.", vbYesNo) = vbNo Then Exit Sub
  23. 'Je cache les feuilles non free to use + administrator pour access a tous
  24. Call AffichFeuillesUtilisateurs
  25. 'J'autorise l'acces de tous au fichier dans Folder "Free to use" avant de sauvegarder
  26. Range("Freeaccess").Value = 1
  27. 'Sauvegarde d'une copie actualisee dans Folder "Free to use"
  28. ActiveWorkbook.SaveAs Filename:= _
  29.     Range("filename").Value & " Passdown by " & Range("Currentuser").Value & " " & Format(Now, "dd-mm-yy hh-mm-ss") & ".xls"
some is in french but the line
Or ActiveWorkbook.ReadOnly Then Exit Sub
comes up in red when attempting to debug

regards

micks