⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modnumtostring.bas

📁 This a complete inventory management system that performs the functions of Purchases, Sales and paym
💻 BAS
📖 第 1 页 / 共 2 页
字号:
NDigits(315) = "Three Hundred Fifteen"
NDigits(316) = "Three Hundred Sixteen"
NDigits(317) = "Three Hundred Seventeen"
NDigits(318) = "Three Hundred Eighteen"
NDigits(319) = "Three Hundred Nineteen"
NDigits(320) = "Three Hundred Twenty"
NDigits(321) = "Three Hundred Twenty One"
NDigits(322) = "Three Hundred Twenty Two"
NDigits(323) = "Three Hundred Twenty Three"
NDigits(324) = "Three Hundred Twenty Four"
NDigits(325) = "Three Hundred Twenty Five"
NDigits(326) = "Three Hundred Twenty Six"
NDigits(327) = "Three Hundred Twenty Seven"
NDigits(328) = "Three Hundred Twenty Eight"
NDigits(329) = "Three Hundred Twenty Nine"
NDigits(330) = "Three Hundred Thirty"
NDigits(331) = "Three Hundred Thirty One"
NDigits(332) = "Three Hundred Thirty Two"
NDigits(333) = "Three Hundred Thirty Three"
NDigits(334) = "Three Hundred Thirty Four"
NDigits(335) = "Three Hundred Thirty Five"
NDigits(336) = "Three Hundred Thirty Six"
NDigits(337) = "Three Hundred Thirty Seven"
NDigits(338) = "Three Hundred Thirty Eight"
NDigits(339) = "Three Hundred Thirty Nine"
NDigits(400) = "Three Hundred Fourty"
NDigits(341) = "Three Hundred Fourty One"
NDigits(342) = "Three Hundred Fourty Two"
NDigits(343) = "Three Hundred Fourty Three"
NDigits(344) = "Three Hundred Fourty Four"
NDigits(345) = "Three Hundred Fourty Five"
NDigits(346) = "Three Hundred Fourty Six"
NDigits(347) = "Three Hundred Fourty Seven"
NDigits(348) = "Three Hundred Fourty Eight"
NDigits(349) = "Three Hundred Fourty Nine"
NDigits(350) = "Three Hundred Fifty"
NDigits(351) = "Three Hundred Fifty One"
NDigits(352) = "Three Hundred Fifty Two"
NDigits(353) = "Three Hundred Fifty Three"
NDigits(354) = "Three Hundred Fifty Four"
NDigits(355) = "Three Hundred Fifty Five"
NDigits(356) = "Three Hundred Fifty Six"
NDigits(357) = "Three Hundred Fifty Seven"
NDigits(358) = "Three Hundred Fifty Eight"
NDigits(359) = "Three Hundred Fifty Nine"
NDigits(360) = "Three Hundred Sixty"
NDigits(361) = "Three Hundred Sixty One"
NDigits(362) = "Three Hundred Sixty Two"
NDigits(363) = "Three Hundred Sixty Three"
NDigits(364) = "Three Hundred Sixty Four"
NDigits(365) = "Three Hundred Sixty Five"
NDigits(366) = "Three Hundred Sixty Six"
NDigits(367) = "Three Hundred Sixty Seven"
NDigits(368) = "Three Hundred Sixty Eight"
NDigits(369) = "Three Hundred Sixty Nine"
NDigits(370) = "Three Hundred Seventy"
NDigits(371) = "Three Hundred Seventy One"
NDigits(372) = "Three Hundred Seventy Two"
NDigits(373) = "Three Hundred Seventy Three"
NDigits(374) = "Three Hundred Seventy Four"
NDigits(375) = "Three Hundred Seventy Five"
NDigits(376) = "Three Hundred Seventy Six"
NDigits(377) = "Three Hundred Seventy Seven"
NDigits(378) = "Three Hundred Seventy Eight"
NDigits(379) = "Three Hundred Seventy Nine"
NDigits(380) = "Three Hundred Eighty"
NDigits(381) = "Three Hundred Eighty One"
NDigits(382) = "Three Hundred Eighty Two"
NDigits(383) = "Three Hundred Eighty Three"
NDigits(384) = "Three Hundred Eighty Four"
NDigits(385) = "Three Hundred Eighty Five"
NDigits(386) = "Three Hundred Eighty Six"
NDigits(387) = "Three Hundred Eighty Seven"
NDigits(388) = "Three Hundred Eighty Eight"
NDigits(389) = "Three Hundred Eighty Nine"
NDigits(390) = "Three Hundred Ninty"
NDigits(391) = "Three Hundred Ninty One"
NDigits(392) = "Three Hundred Ninty Two"
NDigits(393) = "Three Hundred Ninty Three"
NDigits(394) = "Three Hundred Ninty Four"
NDigits(395) = "Three Hundred Ninty Five"
NDigits(396) = "Three Hundred Ninty Six"
NDigits(397) = "Three Hundred Ninty Seven"
NDigits(398) = "Three Hundred Ninty Eight"
NDigits(399) = "Three Hundred Ninty Nine"
NDigits(400) = "Four Hundred"
NDigits(401) = "Four Hundred One"
NDigits(402) = "Four Hundred Two"
NDigits(403) = "Four Hundred Three"
NDigits(404) = "Four Hundred Four"
NDigits(405) = "Four Hundred Five"
NDigits(406) = "Four Hundred Six"
NDigits(407) = "Four Hundred Seven"
NDigits(408) = "Four Hundred Eight"
NDigits(409) = "Four Hundred Nine"
NDigits(410) = "Four Hundred Ten"
NDigits(411) = "Four Hundred Eleven"
NDigits(412) = "Four Hundred Twelve"
NDigits(413) = "Four Hundred Thirteen"
NDigits(414) = "Four Hundred Fourteen"
NDigits(415) = "Four Hundred Fifteen"
NDigits(416) = "Four Hundred Sixteen"
NDigits(417) = "Four Hundred Seventeen"
NDigits(418) = "Four Hundred Eighteen"
NDigits(419) = "Four Hundred Nineteen"
NDigits(420) = "Four Hundred Twenty"
NDigits(421) = "Four Hundred Twenty One"
NDigits(422) = "Four Hundred Twenty Two"
NDigits(423) = "Four Hundred Twenty Three"
NDigits(424) = "Four Hundred Twenty Four"
NDigits(425) = "Four Hundred Twenty Five"
NDigits(426) = "Four Hundred Twenty Six"
NDigits(427) = "Four Hundred Twenty Seven"
NDigits(428) = "Four Hundred Twenty Eight"
NDigits(429) = "Four Hundred Twenty Nine"
NDigits(430) = "Four Hundred Thirty"
NDigits(431) = "Four Hundred Thirty One"
NDigits(432) = "Four Hundred Thirty Two"
NDigits(433) = "Four Hundred Thirty Three"
NDigits(434) = "Four Hundred Thirty Four"
NDigits(435) = "Four Hundred Thirty Five"
NDigits(436) = "Four Hundred Thirty Six"
NDigits(437) = "Four Hundred Thirty Seven"
NDigits(438) = "Four Hundred Thirty Eight"
NDigits(439) = "Four Hundred Thirty Nine"
NDigits(440) = "Four Hundred Fourty"
NDigits(441) = "Four Hundred Fourty One"
NDigits(442) = "Four Hundred Fourty Two"
NDigits(443) = "Four Hundred Fourty Three"
NDigits(444) = "Four Hundred Fourty Four"
NDigits(445) = "Four Hundred Fourty Five"
NDigits(446) = "Four Hundred Fourty Six"
NDigits(447) = "Four Hundred Fourty Seven"
NDigits(448) = "Four Hundred Fourty Eight"
NDigits(449) = "Four Hundred Fourty Nine"
NDigits(450) = "Four Hundred Fifty"
NDigits(451) = "Four Hundred Fifty One"
NDigits(452) = "Four Hundred Fifty Two"
NDigits(453) = "Four Hundred Fifty Three"
NDigits(454) = "Four Hundred Fifty Four"
NDigits(455) = "Four Hundred Fifty Five"
NDigits(456) = "Four Hundred Fifty Six"
NDigits(457) = "Four Hundred Fifty Seven"
NDigits(458) = "Four Hundred Fifty Eight"
NDigits(459) = "Four Hundred Fifty Nine"
NDigits(460) = "Four Hundred Sixty"
NDigits(461) = "Four Hundred Sixty One"
NDigits(462) = "Four Hundred Sixty Two"
NDigits(463) = "Four Hundred Sixty Three"
NDigits(464) = "Four Hundred Sixty Four"
NDigits(465) = "Four Hundred Sixty Five"
NDigits(466) = "Four Hundred Sixty Six"
NDigits(467) = "Four Hundred Sixty Seven"
NDigits(468) = "Four Hundred Sixty Eight"
NDigits(469) = "Four Hundred Sixty Nine"
NDigits(470) = "Four Hundred Seventy"
NDigits(471) = "Four Hundred Seventy One"
NDigits(472) = "Four Hundred Seventy Two"
NDigits(473) = "Four Hundred Seventy Three"
NDigits(474) = "Four Hundred Seventy Four"
NDigits(475) = "Four Hundred Seventy Five"
NDigits(476) = "Four Hundred Seventy Six"
NDigits(477) = "Four Hundred Seventy Seven"
NDigits(478) = "Four Hundred Seventy Eight"
NDigits(479) = "Four Hundred Seventy Nine"
NDigits(480) = "Four Hundred Eighty"
NDigits(481) = "Four Hundred Eighty One"
NDigits(482) = "Four Hundred Eighty Two"
NDigits(483) = "Four Hundred Eighty Three"
NDigits(484) = "Four Hundred Eighty Four"
NDigits(485) = "Four Hundred Eighty Five"
NDigits(486) = "Four Hundred Eighty Six"
NDigits(487) = "Four Hundred Eighty Seven"
NDigits(488) = "Four Hundred Eighty Eight"
NDigits(489) = "Four Hundred Eighty Nine"
NDigits(490) = "Four Hundred Ninty"
NDigits(491) = "Four Hundred Ninty One"
NDigits(492) = "Four Hundred Ninty Two"
NDigits(493) = "Four Hundred Ninty Three"
NDigits(494) = "Four Hundred Ninty Four"
NDigits(495) = "Four Hundred Ninty Five"
NDigits(496) = "Four Hundred Ninty Six"
NDigits(497) = "Four Hundred Ninty Seven"
NDigits(498) = "Four Hundred Ninty Eight"
NDigits(499) = "Four Hundred Ninty Nine"
NDigits(500) = "Five Hundred"
    If Number > 0 And Number <= 500 Then
        ReadSingle = NDigits(Number)
    Else
        ReadSingle = ""
    End If
End Function
Private Function ReadTenths(Number)
Dim NTens(10) As String
Dim Tnumber   As Long
NTens(1) = "Ten"
NTens(2) = "Twenty"
NTens(3) = "Thirty"
NTens(4) = "Forty"
NTens(5) = "Fifty"
NTens(6) = "Sixty"
NTens(7) = "Seventy"
NTens(8) = "Eighty"
NTens(9) = "Ninety"

    Tnumber = Int(Number / 10)
    If Tnumber >= 1 And Tnumber < 19 Then
        ReadTenths = NTens(Tnumber)
    Else
        ReadTenths = ""
    End If
End Function
'This is the routine to read numbers
Public Function Number2String(Number) As String
Dim Tenth       As Integer
Dim Leftover    As Integer
Dim Hundred     As Integer
Dim Thousand    As Long
Dim numstring   As String
Dim leftLakh As String
Dim leftThreeLakh As String
Dim leftFourLakh As String
    If Number <> "" Then
  

        If Number < 500 Then         'Reads unique numbers
            numstring = ReadSingle(Number)
        ElseIf Number < 100 Then    'Reads numbers less than 100
            Tenth = Fix(Number / 10)
            numstring = ReadTenths(Tenth * 10)
            Leftover = Number - (Tenth * 10)
            If Leftover > 0 Then
                numstring = numstring & " " & ReadSingle(Leftover)
            End If
        ElseIf Number < 1000 Then   'Reads numbers between 100 and 999
            Hundred = Fix(Number / 100)
            numstring = ReadSingle(Hundred) & " Hundred"
            Leftover = Number - (Hundred * 100)
            If Leftover > 0 Then
                Tenth = Fix(Leftover / 10)
                If Tenth > 0 Then numstring = numstring & " " & ReadTenths(Tenth * 10)
                Leftover = Number - (Hundred * 100) - (Tenth * 10)
                If Leftover > 0 Then
                    numstring = numstring & " " & ReadSingle(Leftover)
                End If
            End If
        Else
            Thousand = Fix(Number / 1000)
            numstring = ReadSingle(Thousand) & " Thousand"
            Leftover = Number - (Thousand * 1000)
            If Leftover > 0 Then
                Hundred = Fix(Leftover / 100)
                If Hundred > 0 Then
                    numstring = numstring & " " & ReadSingle(Hundred) & " Hundred"
                End If
                Leftover = Number - (Thousand * 1000) - (Hundred * 100)
                If Leftover > 0 Then
                    Tenth = Fix(Leftover / 10)
                    If Tenth > 0 Then
                        numstring = numstring & " " & ReadTenths(Tenth * 10)
                    End If
                    Leftover = Number - (Thousand * 1000) - (Hundred * 100) - (Tenth * 10)
                    If Leftover > 0 Then
                        numstring = numstring & " " & ReadSingle(Leftover)
                    End If
                End If
            End If
        End If
        
        If InStr(numstring, "Hundred Thousand") > 0 Then
             numstring = Replace(numstring, "Hundred Thousand", "Lakh")
        End If
        
        If InStr(numstring, "Ten One") > 0 Then
            numstring = Replace(numstring, "Ten One", "Eleven")
        ElseIf InStr(numstring, "Ten Two") > 0 Then
            numstring = Replace(numstring, "Ten Two", "Twelve")
        ElseIf InStr(numstring, "Ten Three") > 0 Then
            numstring = Replace(numstring, "Ten Three", "Thirdteen")
        ElseIf InStr(numstring, "Ten Four") > 0 Then
            numstring = Replace(numstring, "Ten Four", "Fourteen")
        ElseIf InStr(numstring, "Ten Five") > 0 Then
            numstring = Replace(numstring, "Ten Five", "Fivteen")
        ElseIf InStr(numstring, "Ten Six") > 0 Then
            numstring = Replace(numstring, "Ten Six", "Sixteen")
        ElseIf InStr(numstring, "Ten Seven") > 0 Then
            numstring = Replace(numstring, "Ten Seven", "Seventeen")
        ElseIf InStr(numstring, "Ten Eight") > 0 Then
            numstring = Replace(numstring, "Ten Eight", "Eightteen")
        ElseIf InStr(numstring, "Ten Nine") > 0 Then
            numstring = Replace(numstring, "Ten Nine", "NineTeen")
        End If
        leftLakh = Left(numstring, 11)
        leftThreeLakh = Left(numstring, 13)
        leftFourLakh = Left(numstring, 12)
        If Len(Number) = 6 And leftLakh = "One Hundred" Then
            numstring = Replace(leftLakh, leftLakh, "One Lakh ") & Right(numstring, Len(numstring) - 11)
        End If
        If Len(Number) = 6 And leftLakh = "Two Hundred" Then
            numstring = Replace(leftLakh, leftLakh, "Two Lakh ") & Right(numstring, Len(numstring) - 11)
        End If
        If Len(Number) = 6 And leftThreeLakh = "Three Hundred" Then
            numstring = Replace(leftThreeLakh, leftThreeLakh, "Three Lakh ") & Right(numstring, Len(numstring) - 13)
        End If
        If Len(Number) = 6 And leftFourLakh = "Four Hundred" Then
            numstring = Replace(leftFourLakh, leftFourLakh, "Four Lakh") & Right(numstring, Len(numstring) - 12)
        End If
        Number2String = numstring
    End If
End Function






⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -