Hi there, I'm new in the forum. Hope some kind soul helps 
I wrote this code without many idea of VBA thanks to the search tool:
The thing is I continue receiving the MsgBox alert empty even if all the cells are filled in all the "cases" (Creation, modification, etc..) and it doesnt let me save the file.
I tried with an "ElseIf structure" without success, I suppose is something stupid
btw: i am using excel 2010
Regards,
m.

I wrote this code without many idea of VBA thanks to the search tool:
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUi As Boolean, Cancel As Boolean)
Dim msg As String
With Sheets("Form")
If WorksheetFunction.CountIf(.Range("C5"), "Creation") <> 0 Then
If .Range("C6").Value = "" Then msg = msg & "Select Customer Group" & vbNewLine
If .Range("C7").Value = "" Then msg = msg & "Select Code" & vbNewLine
If .Range("C11").Value = "" Then msg = msg & "Enter Company or Family Name" & vbNewLine
If .Range("B12").Value = "First Name" And .Range("C12").Value = "" Then msg = msg & "Enter First Name" & vbNewLine
If .Range("C13").Value = "" Then msg = msg & "Enter Address" & vbNewLine
If .Range("C14").Value = "" Then msg = msg & "Enter Postal Code" & vbNewLine
If .Range("E14").Value = "" Then msg = msg & "Enter City" & vbNewLine
If .Range("C15").Value = "" Then msg = msg & "Select Country" & vbNewLine
If .Range("D46").Value = "" Then msg = msg & "Enter contact information" & vbNewLine
MsgBox msg, vbExclamation
Cancel = True
End If
If WorksheetFunction.CountIf(.Range("C5"), "Modification") <> 0 Then
If .Range("E5").Value = "" Then msg = msg & "blablablal...
..........same structure for other cases.......................................
...........................................................................................
...........................................................................................
If Cancel Then
MsgBox msg
Else
End If
End With
End Sub
The thing is I continue receiving the MsgBox alert empty even if all the cells are filled in all the "cases" (Creation, modification, etc..) and it doesnt let me save the file.
I tried with an "ElseIf structure" without success, I suppose is something stupid
btw: i am using excel 2010
Regards,
m.