title: Combining several message boxes in one msgbox for each event occurrence
body: <p>I am trying to output specific error messages in my BeforeSave event. Here is the example message box: <a href="http://prntscr.com/jtlxt2" rel="nofollow noreferrer">http://prntscr.com/jtlxt2</a>.
   For every use case the part  has to be replaced by the defined error message from the specific test case. If there are multiple issues, all error messages should be printed in one message box. Here are the possible error messages:</p>
  
  <p>1.Missing ID for the blockTemplate</p>
  
  <p>2.The Parameter “ID” must be defined</p>
  
  <p>3.The cell B2 is not allowed to be empty</p>
  
  <p>4.Cell A2 contains an invalid value: “Ids”</p>
  
  <p>5.Font Size must be an integer from 6 till 72</p>
  
  <p>6.Paragraph Spacing Before must be an integer from 6 till 72
  Font Size must be an integer from 6 till 72</p>
  
  <p>Table "Column Variants":</p>
  
  <p>7.The Variant IDs QINTRO_VAR1, QINTRO_VAR2 are not compatible with the global ID QUINTRO</p>
  
  <p>8.The Cell C6 is not allowed to be empty. To define null for this value use the minus sign (-).</p>
  
  <p>Here is the code I`ve written so far:</p>
  
  <pre><code>Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
  
  Application.EnableEvents = False
  Dim cell As Range
  Dim j As String
  Dim i As Integer
  Dim cellVal As Integer
  Dim cellVal2 As Integer
  Dim sCellVal As String
  Dim a As Variant
  Dim Target As Range
  Dim arr As Range
  Dim rngcheck As Range
  Dim rngcheck2 As Range
  
  sCellVal = Range("A2").Value
  cellVal = Range("B3").Value
  cellVal2 = Range("B4").Value
  
     If Not IsNumeric(cellVal) Then
     MsgBox "Only numeric values allowed."
     End If
  
    'If Sheets("General Info").Range("A2").Value = "" Then
    'Cancel = True
    'MsgBox "Save cancelled"
    'End If
  
    If Not sCellVal = "ID" Then
        Cancel = True
        MsgBox "The Parameter “ID” must be defined"
    End If
  
    If sCellVal = "" Then
        Cancel = True
    MsgBox "Missing ID for the blockTemplate"
    End If
  
    If sCellVal = "IDs" Then
        'Cancel = True
         MsgBox "Cell A2 contains an invalid value: “Ids”"
    End If
  
    If Not cellVal = (6 &lt; 72) Then
        MsgBox "Font Size must be an integer from 6 till 72"
    End If
  
    If Not cellVal2 = (6 &lt; 72) Then
        MsgBox "Paragraph Spacing Before must be an integer from 6 till 72"
    End If
  
     'Set arr = Range("C6:C7")
      'If the columns is the eighth
      'For Each a In arr
       'ActiveSheet.Range("C6:C7").Select
      'If Target.Column = 2 And (Target.Row &gt; 5 And Target.Row &lt; 8) Then
  
  
            Set rngcheck2 = Range("C6:C7")
  
         For Each cell In rngcheck2
      If IsEmpty(cell) Then
  
  
            MsgBox (" The cell" + Target.Address(0, 0)) + "is not allowed to be empty. To define null for this value use the minus sign (-)."
       'The Cell C6 is not allowed to be empty. To define null for this value use the minus sign (-).
      End If
      Next cell
  
  
  
          'Next a:
            MsgBox (" The Variant IDs QINTRO_VAR1, QINTRO_VAR2 are not compatible with the global ID QUINTRO")
  
          Set rngcheck = Range("B2:B4")
  
           i = 0
  
            For Each cell In rngcheck
  
  
          If IsEmpty(cell) Then
  
             i = i + 1
  
            j = j &amp; cell.Address &amp; vbNewLine
  
          End If
  
            Next cell
  
           If i = 0 Then Exit Sub
  
                MsgBox "Sorry, you must enter a value in: " &amp; vbNewLine &amp; j
  
           Application.EnableEvents = True
  
  End Sub
  </code></pre>