USUÁRIO:      SENHA:        SALVAR LOGIN ?    Adicione o VBWEB na sua lista de favoritos   Fale conosco 

 

  Fórum

  Visual Basic
Voltar
Autor Assunto:  Pegar o Mês e Ano de uma data
Leandro Bueno
não registrado
Postada em 31/05/2005 09:42 hs   
Pessoal gostaria de fazer o seguinte:
Em uma text tenho a data.
Como faço para que quando a data chegar por exemplo em:
mês 12 de 2005 abrir uma msgbox e dizer
     
Martini
Pontos: 2843 Pontos: 2843
PAROBÉ
RS - BRASIL
Postada em 31/05/2005 10:14 hs         
para ficar testando um valor em um campo, você pode usar um Timer
 
 

Private Sub Timer1_Timer()
  On Error Resume Next
  If Text1.Text <> "" Then
    If Month(Text1.Text) = "12" Then
      If Year(Text1.Text) = "2005" Then
        MsgBox "Ok"
      End If
    End If
  End If
End Sub
     
ninh@
SÃO PAULO
SP - BRASIL
Postada em 31/05/2005 15:56 hs            
ou pode ser mais resumido assim
 
Private Sub Timer1_Timer()
  On Error Resume Next
  If Text1.Text <> "" Then
    If format(Text1,"m/yyyy") = "12/2005" Then
            MsgBox "Ok"
     End If
  End If
End Sub

Emoções Tem alguem me olhando.....   é vc?
     
Página(s): 1/1    


Seu Nome:

Seu eMail:

ALTERAR PARA MODO HTML
Mensagem:

[:)] = 
[:P] = 
[:(] = 
[;)] = 

HTML DESLIGADO

     
 VOLTAR

  



CyberWEB Network Ltda.    © Copyright 2000-2025   -   Todos os direitos reservados.
Powered by HostingZone - A melhor hospedagem para seu site
Topo da página