|
|
|
![](images/pasta_topo.gif)
|
![](images/folha.gif)
|
Dicas
|
![](images/folha_fim.gif)
|
Visual Basic (Validações)
|
|
![](images/box01esqsup.gif) |
Título da Dica: Campos Vazios em TextBox ou não Selecionados em Combos
|
![](images/box01dirsup.gif) |
|
|
Postada em 25/11/2003 por messohal23
'Esta Função Verifica se os Campos TextBox e ComboBox Estão Vazios ou não selecionados
'ehVazio Nomedacombo ' ou 'ehVazio NomedaText Public Function ehVazio(ctrControl As Control) As Boolean ehVazio = False If TypeOf ctrControl Is ComboBox Then If ctrControl.ListIndex = -1 Then MsgBox ("O Campo " & ctrControl.Tag & " não foi selecionado"), vbExclamation ctrControl.SetFocus ehVazio = True End If Else If ctrControl.Text = "" Then MsgBox ("O Campo " & ctrControl.Tag & " está em branco"), vbExclamation ctrControl.SetFocus ehVazio = True End If End If End Function
'Eh isso 'Fiquem na PAZZZZZZZz
'Emerson Silva
|
|
|
|
![](images/hosted.gif)
|