Option Compare Database Dim p_SilentMode As Boolean Public Sub activate_SilentMode() p_SilentMode = True End Sub Public Function SilentMode_activated() As Boolean SilentMode_activated = p_SilentMode End Function Public Function OA_MsgBox(ByVal msg As String, Optional ByVal buttons As Long, Optional title As String) As Integer If Not p_SilentMode Then OA_MsgBox = MsgBox(msg, buttons, title) Else logger "OA_MsgBox", "INFO", title & " - " & msg While buttons >= 16 buttons = buttons - 16 Wend Select Case buttons Case vbOKOnly OA_MsgBox = vbOK Case vbOKCancel OA_MsgBox = vbOK Case vbAbortRetryIgnore OA_MsgBox = vbIgnore Case vbYesNoCancel OA_MsgBox = vbYes Case vbYesNo OA_MsgBox = vbYes Case vbRetryCancel OA_MsgBox = vbCancel End Select logger "OA_MsgBox", "DEBUG", "Silent mode: OA_Msgbox returned " & OA_MsgBox End If End Function Public Function prompt_for_export_confirmation() As Boolean msg = "**** OPENACCESS EXPORT ****" & vbNewLine & _ "You're going to export the following:" & vbNewLine & vbNewLine & _ msg_list_to_export() & _ "" prompt_for_export_confirmation = (OA_MsgBox(msg, vbOKCancel + vbExclamation, "Confirm") = vbOK) End Function Public Function prompt_for_import_confirmation() As Boolean msg = "**** OPENACCESS IMPORT ****" & vbNewLine & _ "You're going to update " & UCase(CurrentProject.name) & " with the sources files" & vbNewLine & vbNewLine & _ "WARNING: Any non exported work would be lost!" prompt_for_import_confirmation = (OA_MsgBox(msg, vbOKCancel + vbExclamation, "Confirm") = vbOK) End Function