martes, 8 de septiembre de 2015

funcion nombre de mes

Option Explicit
 'Main Function
 Function NOMBRE_MES(ByVal MyNumber)
 Dim mes


 ' String representation of amount.
 MyNumber = Trim(Str(MyNumber))


 Select Case MyNumber
 Case "1"
 mes = "ENERO"
 Case "2"
 mes = "FEBRERO"
 Case "3"
 mes = "MARZO"
 Case "4"
 mes = "ABRIL"
 Case "5"
 mes = "MAYO"
 Case "6"
 mes = "JUNIO"
 Case "7"
 mes = "JULIO"
 Case "8"
 mes = "AGOSTO"
 Case "9"
 mes = "SEPTIEMBRE"
 Case "10"
 mes = "OCTUBRE"
 Case "11"
 mes = "NOVIEMBRE"
 Case "12"
 mes = "DICIEMBRE"

 Case Else
 mes = " "
 End Select
 NOMBRE_MES = mes

 End Function

No hay comentarios.:

Publicar un comentario