عرض مشاركة واحدة
قديم 06-Sep-2011, 06:04 PM   #7
Monzer Osama
مدير عام منتديات جريت بلينز العربية
افتراضي

ولا يهمك أخي حسن ... والله ما اخرب عليك الفرحة

تفضل هذا لكود يظهر لك العربي ....

كود:
Public Function ConvertCurrencyToArabic(MyNumber As String) As String
Dim temp
Dim Riyal, Halalah
Dim DecimalPlace, Count, CountDigit
ReDim Place(9) As String
      Place(2) = "ÃáÜÜÜÝ æ"
      Place(3) = "ãÜáÜíÜæä æ "
      Place(4) = "ÈÜáÜíÜæä æ"
      Place(5) = "ÊÜÑáíæä æ"
MyNumber = Trim(Str(MyNumber))
DecimalPlace = InStr(MyNumber, ".")
If DecimalPlace > 0 Then
        temp = Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2)
        Halalah = ConvertTens(temp)
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
CountDigit = 3
Do While MyNumber <> ""
If Left(MyNumber, 1) = "2" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) <> "000" Then
                Riyals = "&Atilde; &aacute;&Yacute;&Ccedil;&auml; &aelig;"
                temp = ConvertHundreds(Right(MyNumber, 3))
                Riyals = Riyals & temp
Exit Do
        End If
            If Left(MyNumber, 1) = "2" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) = "000" Then
                Riyals = "&Atilde; &aacute;&Yacute;&Ccedil;&auml; "
                Exit Do
        End If
If Left(MyNumber, 1) = "1" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) <> "000" Then
                Riyals = "&Atilde;&aacute;&Yacute; &aelig;"
                temp = ConvertHundreds(Right(MyNumber, 3))
                Riyals = Riyals & temp
                Exit Do
        End If
            If Left(MyNumber, 1) = "1" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) = "000" Then
                Riyals = "&Atilde;&aacute;&Yacute; "
                Exit Do
        End If
If Left(MyNumber, 1) = "3" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) <> "000" And CountDigit = 3 Then
                Riyals = "&Euml;&aacute;&Ccedil;&Euml;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; &aelig;"
                temp = ConvertHundreds(Right(MyNumber, 3))
                Riyals = Riyals & temp
                Exit Do
        End If
        If Left(MyNumber, 1) = "3" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) = "000" And CountDigit = 3 Then
                Riyals = "&Euml;&aacute;&Ccedil;&Euml;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; "
                Exit Do
        End If
        If Left(MyNumber, 1) = "4" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) <> "000" And CountDigit = 3 Then
                Riyals = "&Atilde;&Ntilde;&Egrave;&Uacute;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; &aelig;"
                temp = ConvertHundreds(Right(MyNumber, 3))
                Riyals = Riyals & temp
                Exit Do
        End If
        If Left(MyNumber, 1) = "4" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) = "000" And CountDigit = 3 Then
                Riyals = "&Atilde;&Ntilde;&Egrave;&Uacute;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; "
                Exit Do
        End If
        If Left(MyNumber, 1) = "5" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) <> "000" And CountDigit = 3 Then
                Riyals = "&Icirc;&atilde;&Oacute;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; &aelig;"
                temp = ConvertHundreds(Right(MyNumber, 3))
                Riyals = Riyals & temp
                Exit Do
        End If
        If Left(MyNumber, 1) = "5" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) = "000" And CountDigit = 3 Then
                Riyals = "&Icirc;&atilde;&Oacute;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; "
                Exit Do
        End If
        If Left(MyNumber, 1) = "6" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) <> "000" And CountDigit = 3 Then
                Riyals = "&Oacute;&Ecirc;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; &aelig;"
                temp = ConvertHundreds(Right(MyNumber, 3))
                Riyals = Riyals & temp
                Exit Do
        End If
        If Left(MyNumber, 1) = "6" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) = "000" And CountDigit = 3 Then
                Riyals = "&Oacute;&Ecirc;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; "
                Exit Do
        End If
        If Left(MyNumber, 1) = "7" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) <> "000" And CountDigit = 3 Then
                Riyals = "&Oacute;&Egrave;&Uacute;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; &aelig;"
                temp = ConvertHundreds(Right(MyNumber, 3))
                Riyals = Riyals & temp
                Exit Do
        End If
        If Left(MyNumber, 1) = "7" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) = "000" And CountDigit = 3 Then
                Riyals = "&Oacute;&Egrave;&Uacute;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; "
                Exit Do
        End If
        If Left(MyNumber, 1) = "8" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) <> "000" And CountDigit = 3 Then
                Riyals = "&Euml;&atilde;&Ccedil;&auml;&iacute;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; &aelig;"
                temp = ConvertHundreds(Right(MyNumber, 3))
                Riyals = Riyals & temp
                Exit Do
        End If
    If Left(MyNumber, 1) = "8" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) = "000" And CountDigit = 3 Then
            Riyals = "&Euml;&atilde;&Ccedil;&auml;&iacute;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; "
            Exit Do
    End If
 If Left(MyNumber, 1) = "9" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) <> "000" And CountDigit = 3 Then
            Riyals = "&Ecirc;&Oacute;&Uacute;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; &aelig;"
            temp = ConvertHundreds(Right(MyNumber, 3))
            Riyals = Riyals & temp
            Exit Do
    End If
    If Left(MyNumber, 1) = "9" And Len(MyNumber) = 4 And Mid(MyNumber, 2, 3) = "000" And CountDigit = 3 Then
            Riyals = "&Ecirc;&Oacute;&Uacute;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; "
            Exit Do
    End If
If Left(MyNumber, 2) = "10" And Len(MyNumber) = 5 And Mid(MyNumber, 2, 4) <> "0000" And CountDigit = 3 Then
            Riyals = "&Uacute;&Ocirc;&Ntilde;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; &aelig;"
            temp = ConvertHundreds(Right(MyNumber, 3))
            Riyals = Riyals & temp
            Exit Do
    End If
    If Left(MyNumber, 1) = "1" And Len(MyNumber) = 5 And Mid(MyNumber, 2, 4) = "0000" And CountDigit = 3 Then
            Riyals = "&Uacute;&Ocirc;&Ntilde;&Eacute; &Acirc;&aacute;&Ccedil;&Yacute; "
            Exit Do
    End If
temp = ConvertHundreds(Right(MyNumber, 3))
    If temp <> "" Then
            Riyals = temp & " " & Place(Count) & " " & Riyals
    End If
    If Len(MyNumber) > 3 Then
                MyNumber = Left(MyNumber, Len(MyNumber) - 3)
    Else
            MyNumber = ""
    End If
    Count = Count + 1
    CountDigit = CountDigit + 3
 Loop
Select Case Riyals
           Case ""
                     Riyals = "&aacute;&Ccedil;&iacute;&aelig;&Igrave;&Iuml; &atilde;&Egrave;&aacute;&Ucirc;"
           Case "One"
                   Riyals = " &Ntilde;&iacute;&Ccedil;&aacute; &aelig;&Ccedil;&Iacute;&Uuml;&Iuml; "
           Case Else
                  Riyals = Riyals & " &Ntilde;&iacute;&Uuml;&Uuml;&Ccedil;&aacute; "
End Select
Select Case Halalah
           Case ""
                    Halalah = " &Yacute;&THORN;&Oslash; &aacute;&Ccedil; &Ucirc;&iacute;&Ntilde;"
           Case "&aelig;&Ccedil;&Iacute;&Iuml;"
                    Halalah = " &aelig; &aring;&aacute;&aacute;&Eacute; &aelig;&Ccedil;&Iacute;&Iuml;&Eacute; &Yacute;&THORN;&Oslash; &aacute;&Ccedil; &Ucirc;&iacute;&Ntilde;"
           Case Else
                    Halalah = " &aelig; " & Halalah & " &aring;&aacute;&aacute;&Eacute; &Yacute;&THORN;&Oslash; &aacute;&Ccedil; &Ucirc;&iacute;&Ntilde;"
 End Select
 ConvertCurrencyToArabic = Riyals & Halalah
End Function
__________________
Monzer Osama
Saudia Arabia - Jeddah
00966501826235
Microsoft Certified Business Management Solutions Professional
Microsoft Certified Trainer

آخر تعديل بواسطة Monzer Osama ، 06-Sep-2007 الساعة 06:51 PM.
Monzer Osama غير متواجد حالياً   رد مع اقتباس