Sub aa()
If aTestuj Then ActiveSheet.SaveAs Filename:="U:\AV_Beku\Mischform\hotove zakazky2014" & "\" & Sheets("list1").Range("BK2").Text
End Sub
Private Function aTestuj() As Boolean
aTestuj = True
If Range("D2").Text = "" Then aTestuj = False: Exit Function
If Range("BK2") = "" Then aTestuj = False: Exit Function
If Range("BK3") = "" Then aTestuj = False: Exit Function
If Range("BL5") = "" Then aTestuj = False: Exit Function
If Range("BJ16 ") = "" Then aTestuj = False: Exit Function
If Range("BJ18 ") = "" Then aTestuj = False: Exit Function
If Range("BN8 ") <> "OK" Or Range("BN8 ") <> "STOP" Then aTestuj = False: Exit Function
End Functioncitovat