Ayuda con saludo de inicio
Estoy tratando de crear un saludo al iniciar un programa hecho en visual basic pero tengo este codigo que no me funciona :-(
Private Sub Form_Activate()
mihora = Format(Now, "hh:mm")
If mihora > "23:59" And mihora < "12:01" Then
Label1.Caption = "buenas noches"
rc = sndPlaySound("Y:mis documentosproyectos VBpruebasoundgood morning.wav", SND_NOSTOP)
End If
If mihora > "12:00" And mihora < "19:01" Then
rc = sndPlaySound("Y:mis documentosproyectos VBpruebasoundgood afternoon.wav", SND_NOSTOP)
End If
If mihora > "19:00" And mihora < "22:01" Then
rc = sndPlaySound("Y:mis documentosproyectos VBpruebasoundgood evening.wav", SND_NOSTOP)
End If
If mihora > "22:00" And mihora < "00:01" Then
rc = sndPlaySound("Y:mis documentosproyectos VBpruebasoundgood night.wav", SND_NOSTOP)
End If
End Sub
quien me puede dar alguna sugerencia?
desde ya muchas gracias
Private Sub Form_Activate()
mihora = Format(Now, "hh:mm")
If mihora > "23:59" And mihora < "12:01" Then
Label1.Caption = "buenas noches"
rc = sndPlaySound("Y:mis documentosproyectos VBpruebasoundgood morning.wav", SND_NOSTOP)
End If
If mihora > "12:00" And mihora < "19:01" Then
rc = sndPlaySound("Y:mis documentosproyectos VBpruebasoundgood afternoon.wav", SND_NOSTOP)
End If
If mihora > "19:00" And mihora < "22:01" Then
rc = sndPlaySound("Y:mis documentosproyectos VBpruebasoundgood evening.wav", SND_NOSTOP)
End If
If mihora > "22:00" And mihora < "00:01" Then
rc = sndPlaySound("Y:mis documentosproyectos VBpruebasoundgood night.wav", SND_NOSTOP)
End If
End Sub
quien me puede dar alguna sugerencia?
desde ya muchas gracias
