I am using a Macro Public Function in Excel which format the date: Optional Formato As String = "dd mmmm yyyy" _ ) As Variant this display by example 11 Febrero 2008, but I need to display 11 de Febrero de 2008 It's possible to change to this format? Thanks for your help Complete Macro: Public Function FechaSi( _ Optional Condicion As Variant = "", _ Optional SiCumple As Variant = "", _ Optional SiNoCumple As Variant = "", _ Optional Formato As String = "dd mmmm yyyy" _ ) As Variant If Condicion = "" Or Condicion = True Then If SiCumple = "" Then SiCumple = Format(Now, Formato) ElseIf IsDate(SiCumple) Then SiCumple = Format(CLng(CDate(SiCumple)), Formato) End If FechaSi = SiCumple Else If IsDate(SiNoCumple) Then SiNoCumple = _ Format(CLng(CDate(SiNoCumple)), Formato) FechaSi = SiNoCumple End If End Function
Try "dd \de mmmm \de yyyy" -- Enjoy, Tony "Juan E. Acuña K." wrote in message news:892D140A-22E9-492D-BFAD-E15C570AA9B5@microsoft.com... >I am using a Macro Public Function in Excel which format the date: > > Optional Formato As String = "dd mmmm yyyy" _ > ) As Variant > > this display by example 11 Febrero 2008, but I need to display 11 de > Febrero de 2008 > > It's possible to change to this format? > > Thanks for your help > > Complete Macro: > Public Function FechaSi( _ > Optional Condicion As Variant = "", _ > Optional SiCumple As Variant = "", _ > Optional SiNoCumple As Variant = "", _ > Optional Formato As String = "dd mmmm yyyy" _ > ) As Variant > If Condicion = "" Or Condicion = True Then > If SiCumple = "" Then > SiCumple = Format(Now, Formato) > ElseIf IsDate(SiCumple) Then > SiCumple = Format(CLng(CDate(SiCumple)), Formato) > End If > FechaSi = SiCumple > Else > If IsDate(SiNoCumple) Then SiNoCumple = _ > Format(CLng(CDate(SiNoCumple)), Formato) > FechaSi = SiNoCumple > End If > End Function >