Creo q no me funciona
Publicado por Drasick (22 intervenciones) el 25/02/2005 13:57:14
Public Function Diap(numero As Integer) As String
If (numero = 1) Then
Diap = "Dilluns"
Else
If (numero = 2) Then
Diap = "Dimarts"
Else
If (numero = 3) Then
Diap = "Dimecres"
Else
If (numero = 4) Then
Diap = "Dijous"
Else
If (numero = 5) Then
Diap = "Divendres" ' si la tabla está vacía
End If
End If
End If
End If
End If
End Function
Esta funcion la he hecho sin tener mucha idea de Visual, la idea es q cuando entre un numero 1,2,3,4,5 me de vuelva el dia de la semana al q corresponde 1=Lunes, 2=Martes... Pero yo lo he preobado y no me funciona. Por cierto el parametro de retorno es el nombre de la funcion por lo que he podido deducir no?
If (numero = 1) Then
Diap = "Dilluns"
Else
If (numero = 2) Then
Diap = "Dimarts"
Else
If (numero = 3) Then
Diap = "Dimecres"
Else
If (numero = 4) Then
Diap = "Dijous"
Else
If (numero = 5) Then
Diap = "Divendres" ' si la tabla está vacía
End If
End If
End If
End If
End If
End Function
Esta funcion la he hecho sin tener mucha idea de Visual, la idea es q cuando entre un numero 1,2,3,4,5 me de vuelva el dia de la semana al q corresponde 1=Lunes, 2=Martes... Pero yo lo he preobado y no me funciona. Por cierto el parametro de retorno es el nombre de la funcion por lo que he podido deducir no?
Valora esta pregunta


0