Private Sub CommandButton1_Click()
PoslRiadok = ActiveSheet.Cells.Find("*", SearchOrder:=xlByRows, LookIn:=xlValues, SearchDirection:=xlPrevious).Row
'PoslRiadok = ActiveSheet.Cells(ActiveSheet.Rows.Count, col).End(xlUp).Row
If Range("D" & PoslRiadok) <> "" And Range("E" & PoslRiadok) <> "" And Range("H" & PoslRiadok) <> "" And Range("I" & PoslRiadok) <> "" And Range("K" & PoslRiadok) <> "" And Range("L" & PoslRiadok) <> "" And Range("M" & PoslRiadok) <> "" And Range("N" & PoslRiadok) <> "" And Range("O" & PoslRiadok) <> "" And Range("P" & PoslRiadok) <> "" And Range("Q" & PoslRiadok) <> "" And Range("R" & PoslRiadok) <> "" And Range("U" & PoslRiadok) <> "" And Range("V" & PoslRiadok) <> "" And Left(Range("D" & PoslRiadok), 1) <> " " And Left(Range("E" & PoslRiadok), 1) <> " " And Left(Range("H" & PoslRiadok), 1) <> " " And Left(Range("I" & PoslRiadok), 1) <> " " And Left(Range("K" & PoslRiadok), 1) <> " " And Left(Range("LH" & PoslRiadok), 1) <> " " And Left(Range("M" & PoslRiadok), 1) <> " " And Left(Range("N" & PoslRiadok), 1) <> " " And Left(Range("O" & PoslRiadok), 1) <> " " And Left(Range("P" & PoslRiadok), 1) <> " " And Left(Range("Q" & PoslRiadok), 1) <> " " _
And Left(Range("R" & PoslRiadok), 1) <> " " And Left(Range("U" & PoslRiadok), 1) <> " " And Left(Range("V" & PoslRiadok), 1) <> " " Then
MsgBox "Click OK, your request is going to be sent and this file closed:)", vbOKOnly, "All mandatory fields filled in:)"
ActiveWorkbook.Save
Dim Outlook As Object, EMail As Object
Set Outlook = CreateObject("Outlook.Application")
Set EMail = Outlook.CreateItem(0)
With EMail
.To = "fero@fero.com"
.CC = ""
.BCC = ""
.Subject = "BD/CD take care of new Item from requestor:)"
.Body = "<\\10.196.196.10\xxx\request.xlsm>"
.Send
End With
Set EMail = Nothing
Set Outlook = Nothing
ActiveWorkbook.Close
Exit Sub
Else: MsgBox "Row " & PoslRiadok & " contains unfilled mandatory data:(, Fill them in and send your request again!", vbOKOnly, "Warning!"
End If
End Sub