Oi eu fiz assim, no final coloquei um novo else e coloquei para ele validar com true:
Código: Selecionar todos
Private Function ValidaCamposFormulario() As Boolean
If Me.txtNomeEmpresa.Value = "" Then
Me.txtNomeEmpresa.SetFocus
MsgBox " A data é um campo obrigatório. ", vbOKOnly, " Campo Obrigatório "
ValidaCamposFormulario = False
Exit Function
ElseIf Me.txtNomeContato.Value = "" Then
Me.txtNomeContato.SetFocus
MsgBox " O Procedimento é um campo obrigatório.", vbOKOnly, " Campo Obrigatório "
ValidaCamposFormulario = False
Exit Function
ElseIf Me.txtEndereco.Value = "" Then
Me.txtEndereco.SetFocus
MsgBox "O Profissional é um campo obrigatório. ", vbOKOnly, " Campo Obrigatório "
ValidaCamposFormulario = False
Exit Function
ElseIf Me.txtCidade.Value = "" Then
Me.txtCidade.SetFocus
MsgBox "O Valor é um campo obrigatório. ", vbOKOnly, " Campo Obrigatório "
ValidaCamposFormulario = False
Exit Function
Else
ValidaCamposFormulario = True
End If
'lucro
End Function