Special Offer
Source Code *****Inventory
Management System in VB.Net***** Source
Code
With Multiple Features
BUY SOURCE CODE NOW, JUST $ 30
|
||
By Online Transfer
|
By PayPal
|
Amount in Words
Download Link
The Following Function is used in my Inventory Management system for converting amounts into words.For example, let us assume a number is 24,578, then the function GetInWord() is converted into "Twenty Four thousand five hundred seventy eighty Rupees only"
Video Demo For Convert Number Into Words
Download Link
GetInwords function
Public Function GetInWords(ByVal
num As Long) As String
On Error Resume Next
Dim
str As String
Dim
subnum As Long
Dim
Digits As New
TextBox
str = ""
Digits.Text = num.ToString
If
Len(Digits.Text) > 11 Then
str = GetSubInWords(CLng(Mid(Digits.Text, 1, Len(Digits.Text) - 9)))
Digits.Text = Mid(Digits.Text,
Len(Digits.Text) - 9 + 1, 9)
End If
If
Len(Digits.Text) = 11 Then
subnum = CLng(Mid(Digits.Text,
1, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Billion "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Billion "
End
If
subnum = CLng(Mid(Digits.Text,
3, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Crores "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Crores "
End
If
subnum = CLng(Mid(Digits.Text,
5, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum \ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Lakhs "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Lakhs "
End If
subnum = CLng(Mid(Digits.Text,
7, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
9, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
10, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Rupees only "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Rupees only "
End
If
str = str + " Rupees only "
End If
If
Len(Digits.Text) = 10 Then
subnum = CLng(Mid(Digits.Text,
1, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Billion "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Billion "
End
If
subnum = CLng(Mid(Digits.Text,
2, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Crores "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Crores "
End
If
subnum = CLng(Mid(Digits.Text,
4, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Lakhs "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Lakhs "
End
If
subnum = CLng(Mid(Digits.Text,
6, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
8, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
9, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'
str = str + " Rupees only "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str += "
Rupees only "
End
If
str = str + " Rupees only "
End If
If
Len(Digits.Text) = 9 Then
subnum = CLng(Mid(Digits.Text,
1, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Crores "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Crores "
End
If
subnum = CLng(Mid(Digits.Text,
3, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Lakhs "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Lakhs "
End
If
subnum = CLng(Mid(Digits.Text,
5, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
7, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += "
Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
8, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Rupees only "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'
str += " Rupees only "
End
If
str = str + " Rupees only "
End If
If
Len(Digits.Text) = 8 Then
subnum = CLng(Mid(Digits.Text,
1, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Crores "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Crores "
End
If
subnum = CLng(Mid(Digits.Text,
2, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Lakh "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Lakh "
End
If
subnum = CLng(Mid(Digits.Text,
4, 2))
If subnum
>= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += "
Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
6, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
7, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Rupees only "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Rupees only "
End
If
str = str + " Rupees only "
End If
If
Len(Digits.Text) = 7 Then
subnum = CLng(Mid(Digits.Text,
1, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Lakh "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Lakh "
End
If
subnum = CLng(Mid(Digits.Text,
3, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += "
Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
5, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
6, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Rupees only "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Rupees only "
End If
str = str + " Rupees only "
End If
If
Len(Digits.Text) = 6 Then
subnum = CLng(Mid(Digits.Text,
1, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Lakh "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Lakh "
End
If
subnum = CLng(Mid(Digits.Text,
2, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += "
Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
4, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + "
Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
5, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum \ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Rupees only "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Rupees only "
End If
str = str + " Rupees only "
End If
If
Len(Digits.Text) = 5 Then
subnum = CLng(Mid(Digits.Text,
1, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + "
" + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
3, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
4, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Rupees only "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Rupees only "
End
If
str = str + " Rupees only "
End If
If
Len(Digits.Text) = 4 Then
subnum = CLng(Mid(Digits.Text,
1, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
2, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
3, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Rupees only "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Rupees only "
End
If
str = str + " Rupees only "
End If
If
Len(Digits.Text) = 3 Then
subnum = CLng(Mid(Digits.Text,
1, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
2, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Rupees only "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Rupees only "
End
If
str = str + " Rupees only "
End If
If
Len(Digits.Text) = 2 Or Len(Digits.Text) = 1 Then
subnum = CLng(Mid(Digits.Text,
1, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Rupees only "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Rupees only "
End
If
str = str + " Rupees only "
End If
If
Len(Digits.Text) = 0 Then
str = ""
End If
Return
str
End Function
Public Function GetTens(ByVal
num As Integer)
As String
On Error Resume Next
Select
Case (num)
Case
0
Return
("")
Case
1
Return
("One")
Case
2
Return
("Two")
Case
3
Return
("Three")
Case
4
Return
("Four")
Case
5
Return
("Five")
Case
6
Return
("Six")
Case
7
Return ("Seven")
Case
8
Return
("Eight")
Case
9
Return
("Nine")
Case
10
Return
("Ten")
Case
11
Return
("Eleven")
Case
12
Return
("Twelve")
Case
13
Return
("Thirteen")
Case
14
Return
("Fourteen")
Case
15
Return
("Fifteen")
Case
16
Return
("Sixteen")
Case 17
Return
("Seventeen")
Case
18
Return
("Eighteen")
Case
19
Return
("Nineteen")
End Select
Return
("")
End Function
Public Function GetTwenty(ByVal
num As Integer)
As String
On Error Resume Next
Select
Case (num)
Case
0
Return
("")
Case
1
Return
("One")
Case
2
Return
("Twenty")
Case
3
Return
("Thirty")
Case
4
Return
("Forty")
Case
5
Return
("Fifty")
Case
6
Return
("Sixty")
Case
7
Return
("Seventy")
Case
8
Return
("Eighty")
Case
9
Return
("Ninety")
End Select
Return
("")
End Function
Public Function GetSubInWords(ByVal
num As Long) As String
On Error Resume Next
Dim
str As String
Dim
subnum As Long
Dim
Digits As New
TextBox
str = ""
Digits.Text = num.ToString
If
Len(Digits.Text) = 11 Then
subnum = CLng(Mid(Digits.Text,
1, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum \ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Billion "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Billion "
End If
subnum = CLng(Mid(Digits.Text,
3, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Crores "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Crores "
End
If
subnum = CLng(Mid(Digits.Text,
5, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + "
" + GetTens(subnum Mod 10)
str = str + " Lakhs "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Lakhs "
End
If
subnum = CLng(Mid(Digits.Text,
7, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
9, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
10, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum \
10)
str = str + " " + GetTens(subnum Mod 10)
ElseIf
subnum > 0 Then
str += GetTens(subnum)
End
If
str += "
Billions And "
End If
If
Len(Digits.Text) = 10 Then
subnum = CLng(Mid(Digits.Text,
1, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Billion "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Billion "
End
If
subnum = CLng(Mid(Digits.Text,
2, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Crores "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Crores "
End
If
subnum = CLng(Mid(Digits.Text,
4, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Lakhs "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Lakhs "
End
If
subnum = CLng(Mid(Digits.Text,
6, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
8, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += "
Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
9, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
ElseIf
subnum > 0 Then
str += GetTens(subnum)
End
If
str += "
Billions And "
End If
If
Len(Digits.Text) = 9 Then
subnum = CLng(Mid(Digits.Text,
1, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum \ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Crores "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Crores "
End If
subnum = CLng(Mid(Digits.Text,
3, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Lakhs "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Lakhs "
End
If
subnum = CLng(Mid(Digits.Text,
5, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + "
" + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
7, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
8, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
ElseIf
subnum > 0 Then
str += GetTens(subnum)
End
If
str += "
Billions And "
End If
If
Len(Digits.Text) = 8 Then
subnum = CLng(Mid(Digits.Text,
1, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Crores "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Crores "
End
If
subnum = CLng(Mid(Digits.Text,
2, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Lakh "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Lakh "
End
If
subnum = CLng(Mid(Digits.Text,
4, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
6, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
7, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
ElseIf
subnum > 0 Then
str += GetTens(subnum)
End
If
str += "
Billions And "
End If
If
Len(Digits.Text) = 7 Then
subnum = CLng(Mid(Digits.Text,
1, 2))
If subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Lakh "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += "
Lakh "
End
If
subnum = CLng(Mid(Digits.Text,
3, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
5, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
6, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'
str = str + " Billions And "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Billions And "
End
If
str += "
Billions And "
End If
If
Len(Digits.Text) = 6 Then
subnum = CLng(Mid(Digits.Text,
1, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Lakh "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Lakh "
End
If
subnum = CLng(Mid(Digits.Text,
2, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + "
Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
4, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum \ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
5, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Billions And "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Billions And "
End
If
str += "
Billions And "
End If
If
Len(Digits.Text) = 5 Then
subnum = CLng(Mid(Digits.Text,
1, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
3, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
4, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum \ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Billions And "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Billions And "
End
If
str += "
Billions And "
End If
If
Len(Digits.Text) = 4 Then
subnum = CLng(Mid(Digits.Text,
1, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + "
" + GetTens(subnum Mod 10)
str = str + " Thousand "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Thousand "
End
If
subnum = CLng(Mid(Digits.Text,
2, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
3, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Billions And "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Billions And "
End
If
str += "
Billions And "
End If
If
Len(Digits.Text) = 3 Then
subnum = CLng(Mid(Digits.Text,
1, 1))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
str = str + " Hundred "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
str += " Hundred "
End
If
subnum = CLng(Mid(Digits.Text,
2, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Billions And "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Billions And "
End
If
str += "
Billions And "
End If
If
Len(Digits.Text) = 2 Or Len(Digits.Text) = 1 Then
subnum = CLng(Mid(Digits.Text,
1, 2))
If
subnum >= 20 Then
str = str + GetTwenty(subnum
\ 10)
str = str + " " + GetTens(subnum Mod 10)
'str
= str + " Billions And "
ElseIf
subnum > 0 Then
str += GetTens(subnum)
'str
+= " Billions And "
End
If
str += "
Billions And "
End If
If
Len(Digits.Text) = 0 Then
str = ""
End If
Return
str
End Function
|
Inventory Management In Vb.Net
With Full Source Code
Contact: sureshjyothijv@gmail.com
Contact: sureshjyothijv@gmail.com
Just $ 30 Only
Special Offer
Source Code *****Inventory
Management System in VB.Net***** Source
Code
With Multiple Features
BUY SOURCE CODE NOW, JUST $ 30
|
||
By Online Transfer
|
By PayPal
|
I just download your source code.
ReplyDeleteNice Inventory Management System
Thank you for your source code.
I like it.