Imports System.IO Public Class 財務支付單_最高主管審核 Dim 對話框(20) As String Dim SK1, SK2 As String Dim 不可編輯x As Boolean Dim 已開啟 As Boolean = False Private Sub Set_清單1() Dim ds1 As New DataSet : 財務收支單_dgv.DataSource = Nothing : ds1.Clear() 財務收支單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing 財務收支單_dgv.ColumnHeadersHeight = 40 : 財務收支單_dgv.AllowUserToAddRows = False Dim 條件, 時間條件 As String If HX_ch.Checked Then : 條件 = " AND (財務收支明細表.流水號 LIKE N'%HXI%') " ElseIf PGS_ch.Checked Then : 條件 = " AND (財務收支明細表.流水號 LIKE N'%PGS%') " Else : 條件 = "" : End If 時間條件 = "AND (財務收支明細表.支付日期 BETWEEN '" & Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd") & "' AND '" & Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd") & "') " SQL_財物最高主管審核_查詢財務收支控制表(條件, 時間條件) : da.Fill(ds1) : 財務收支單_dgv.DataSource = ds1.Tables(0) : conn.Close() 財務收支單_dgv.Columns(0).FillWeight = 125 : 財務收支單_dgv.Columns(1).FillWeight = 75 : 財務收支單_dgv.Columns(2).FillWeight = 120 財務收支單_dgv.Columns(11).FillWeight = 40 : 財務收支單_dgv.Columns(12).FillWeight = 40 : 財務收支單_dgv.Columns("核准圖檔").Visible = False 財務收支單_dgv.Columns("檢查人").Visible = False : 財務收支單_dgv.Columns("主管人").Visible = False : 財務收支單_dgv.Columns("申請日期").Visible = False 財務收支單_dgv.Columns("已審核").Visible = False 財務收支單_dgv.Columns(12).Visible = False For I As Integer = 3 To 10 : 財務收支單_dgv.Columns(I).Visible = False : Next : For I As Integer = 13 To 15 : 財務收支單_dgv.Columns(I).Visible = False : Next 財務收支單_dgv.Columns(0).ReadOnly = True : 財務收支單_dgv.Columns(1).ReadOnly = True : 財務收支單_dgv.Columns(2).ReadOnly = True For I As Integer = 0 To 財務收支單_dgv.Rows.Count - 1 財務收支單_dgv.Rows(I).Cells(11).Value = False : 財務收支單_dgv.Rows(I).Cells(12).Value = False If 財務收支單_dgv.Rows(I).Cells("主管人").Value.ToString <> "" Then : 財務收支單_dgv.Rows(I).Cells(11).Value = True : End If If Strings.Left(財務收支單_dgv.Rows(I).Cells(10).Value.ToString, 2) = "作廢" Then : 財務收支單_dgv.Rows(I).Cells(12).Value = True : End If Next End Sub Private Sub 部門選單下拉清單讀取() SQL_部門選單() : 部門選單_cb.Items.Clear() : While (dr.Read()) : 部門選單_cb.Items.Add(dr("部門")) : End While : conn.Close() End Sub Private Sub 匯率() SQL_營運成本收支單申請_查詢匯率() If dr.Read() Then 人民幣匯率_tb.Text = dr("中心匯率").ToString : 美金匯率_tb.Text = dr("美金匯率").ToString : 印尼匯率_tb.Text = dr("印尼盾").ToString : conn.Close() : dr.Close() Else : conn.Close() : dr.Close() : 匯率管理.Close() : 匯率管理.Show() : 匯率管理.BringToFront() : End If End Sub Private Sub 語言轉換讀取() If 系統語言 = "繁體中文" Then : 語言 = "CH" : ElseIf 系統語言 = "English" Then : 語言 = "EN" : ElseIf 系統語言 = "Indonesian" Then : 語言 = "IN" : End If If 跨部門開啟 = False Then : Me.Text = 系統語言字典("H001-297-" & 語言) : Else : Me.Text = 系統語言字典("H001-297-" & 語言) : End If 財務單號_lb.Text = 系統語言字典("H301-129-" & 語言) : Label1.Text = 系統語言字典("H314-100-" & 語言) : Label2.Text = 系統語言字典("H314-101-" & 語言) Label3.Text = 系統語言字典("H314-102-" & 語言) : Label4.Text = 系統語言字典("H314-103-" & 語言) : Label5.Text = 系統語言字典("H314-104-" & 語言) Label6.Text = 系統語言字典("H314-105-" & 語言) : 會計科目_lb.Text = 系統語言字典("H301-120-" & 語言) : 表頭(113) = 系統語言字典("H204-120-" & 語言) 表頭(112) = 系統語言字典("H301-107-" & 語言) : 表頭(39) = 系統語言字典("H301-134-" & 語言) : 表頭(111) = 系統語言字典("H301-108-" & 語言) 表頭(20) = 系統語言字典("H314-124-" & 語言) : 表頭(107) = 系統語言字典("H301-111-" & 語言) : 表頭(109) = 系統語言字典("H301-109-" & 語言) 表頭(11) = 系統語言字典("H301-112-" & 語言) : 表頭(114) = 系統語言字典("H301-113-" & 語言) : 表頭(98) = 系統語言字典("H301-114-" & 語言) 表頭(115) = 系統語言字典("H301-116-" & 語言) : 表頭(108) = 系統語言字典("H301-117-" & 語言) : 表頭(110) = 系統語言字典("H301-115-" & 語言) Label8.Text = 系統語言字典("H314-106-" & 語言) : Label9.Text = 系統語言字典("H314-107-" & 語言) : Label10.Text = 系統語言字典("H314-108-" & 語言) Label11.Text = 系統語言字典("H314-109-" & 語言) : Label12.Text = 系統語言字典("H314-110-" & 語言) : 對話框(2) = 系統語言字典("H301-125-" & 語言) 對話框(3) = 系統語言字典("G000-117-" & 語言) : 對話框(1) = 系統語言字典("H301-124-" & 語言) : 表頭(1) = 系統語言字典("H314-106-" & 語言) 對話框(4) = 系統語言字典("H301-127-" & 語言) : 對話框(5) = 系統語言字典("H302-119-" & 語言) : 對話框(6) = 系統語言字典("H302-120-" & 語言) 對話框(7) = 系統語言字典("H302-121-" & 語言) : 表頭(3) = 系統語言字典("H314-111-" & 語言) 對話框(8) = 系統語言字典("H314-112-" & 語言) : Label18.Text = 系統語言字典("H314-113-" & 語言) : Label15.Text = 系統語言字典("H314-114-" & 語言) Label17.Text = 系統語言字典("H314-115-" & 語言) : Label16.Text = 系統語言字典("H314-116-" & 語言) : Label19.Text = 系統語言字典("H301-140-" & 語言) 對話框(9) = 系統語言字典("H314-123-" & 語言) : Label20.Text = 系統語言字典("H314-124-" & 語言) : 對話框(10) = 系統語言字典("H303-129-" & 語言) 對話框(11) = 系統語言字典("H303-102-" & 語言) : 對話框(12) = 系統語言字典("H303-101-" & 語言) : 對話框(13) = 系統語言字典("H611-112-" & 語言) 對話框(14) = 系統語言字典("H611-111-" & 語言) : 對話框(15) = 系統語言字典("H611-113-" & 語言) : 對話框(16) = 系統語言字典("H405-105-" & 語言) 對話框(17) = 系統語言字典("H405-104-" & 語言) : 對話框(18) = 系統語言字典("H405-106-" & 語言) : Label21.Text = 系統語言字典("H303-108-" & 語言) 月_ch.Text = 系統語言字典("H306-106-" & 語言) : 週_ch.Text = 系統語言字典("H303-139-" & 語言) : 日_ch.Text = 系統語言字典("H303-140-" & 語言) End Sub Private Sub 修改BT() If 月_ch.Checked Then 當月_bt.Text = 對話框(10) : 上個月_bt.Text = 對話框(11) : 下個月_bt.Text = 對話框(12) ElseIf 週_ch.Checked Then 當月_bt.Text = 對話框(13) : 上個月_bt.Text = 對話框(14) : 下個月_bt.Text = 對話框(15) Else 當月_bt.Text = 對話框(16) : 上個月_bt.Text = 對話框(17) : 下個月_bt.Text = 對話框(18) End If End Sub Private Sub 清空介面() 單號_tb.Text = "" : 系統單號_bt.Text = "" : 系統單號_bt.Text = "" : 第二層_cb.Text = "" : 第三層_cb.Text = "" : 部門選單_cb.Text = "" : 申請金額_nud.Value = 0 內容_tb.Text = "" : 支付對象_tb.Text = "" : 支付銀行_tb.Text = "" : 營行帳號_tb.Text = "" : 銀行支行_tb.Text = "" : 申請人_tb.Text = "" : 檢查人_tb.Text = "" 主管_tb.Text = "" : 審核人_tb.Text = "" : 簽名圖_pb.Image = Nothing End Sub Private Sub 財務收支單_最高主管審核_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.MdiParent = HX_PGS_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True : 首次開啟 = True 年份2_cb.Text = Year(Today) : 月份2_cb.SelectedIndex = Month(Today) - 1 : Panel1.SendToBack() 風格() : H(314) = True : 介面 = "H317" : 語言轉換讀取() : 第一層下拉表單資料載入() : 幣別_cb.Text = "IDR" : 顯示說明(999, False) MyMod.清單字體大小調整() 財務收支單_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", HX_PGS_ERP_SYS.字體_NUD.Value) End Sub Private Sub 財務收支單_最高主管審核_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown SQL_主管名稱(2, 23) : If dr.Read Then : 出納人員 = dr("姓名").ToString : End If 部門選單下拉清單讀取() : 月_ch.Checked = True : 週_ch.Checked = False : 日_ch.Checked = False : HX_ch.Checked = False : PGS_ch.Checked = False : ALL_ch.Checked = True If 待辦進入 <> "" Then : 開始日期_dtp.Value = Strings.Left(待辦進入1, 8) & "01" : 結束日期_dtp.Value = 開始日期_dtp.Value.AddMonths(1).AddDays(-1) : 待辦進入1 = "" Else : 當月_bt.PerformClick() : End If : Set_清單1() If PA48 = "採購" Then : 匯率() : 首次開啟 = False : Else : 匯率() : 幣別_cb.SelectedIndex = 3 : 編號1_cb.Text = "B-02" : 首次開啟 = False : End If : PA48 = "" If 待辦進入 <> "" Then For i As Integer = 0 To 財務收支單_dgv.Rows.Count - 1 If 待辦進入 = 財務收支單_dgv.Rows(i).Cells(0).Value.ToString Then 單號_tb.Text = 財務收支單_dgv.Rows(i).Cells(0).Value.ToString : 申請日期_dtp.Value = 財務收支單_dgv.Rows(i).Cells("申請日期").Value.ToString 申請人_tb.Text = 財務收支單_dgv.Rows(i).Cells(2).Value.ToString : 系統單號_bt.Text = 財務收支單_dgv.Rows(i).Cells(3).Value.ToString 幣別_cb.Text = 財務收支單_dgv.Rows(i).Cells(4).Value.ToString : 編號1_cb.Text = Strings.Left(財務收支單_dgv.Rows(i).Cells("類別").Value.ToString, 4) 編號2_cb.Text = Strings.Left(財務收支單_dgv.Rows(i).Cells("類別").Value.ToString, 7) : 編號3_cb.Text = 財務收支單_dgv.Rows(i).Cells("類別").Value.ToString 金額大寫_tb.Text = 財務收支單_dgv.Rows(i).Cells("大寫").Value.ToString : 部門選單_cb.Text = Strings.Mid(財務收支單_dgv.Rows(i).Cells(0).Value.ToString, 5, 3) 內容_tb.Text = 財務收支單_dgv.Rows(i).Cells("明細").Value.ToString : 支付對象_tb.Text = 財務收支單_dgv.Rows(i).Cells("支付對象").Value.ToString 營行帳號_tb.Text = 財務收支單_dgv.Rows(i).Cells("公司").Value.ToString : 支付銀行_tb.Text = 財務收支單_dgv.Rows(i).Cells("付款銀行").Value.ToString 銀行支行_tb.Text = 財務收支單_dgv.Rows(i).Cells("銀行支行").Value.ToString : 檢查人_tb.Text = 財務收支單_dgv.Rows(i).Cells("檢查人").Value.ToString 主管_tb.Text = 財務收支單_dgv.Rows(i).Cells("主管人").Value.ToString If 財務收支單_dgv.Rows(i).Cells(表頭(20)).Value.ToString <> "" Then : 支付日期_dtp.Value = 財務收支單_dgv.Rows(i).Cells(表頭(20)).Value : End If If 財務收支單_dgv.Rows(i).Cells(11).Value = True Or 財務收支單_dgv.Rows(i).Cells(12).Value = True Then : 不可編輯x = True : Else : 不可編輯x = False : End If If Strings.Left(財務收支單_dgv.Rows(i).Cells(10).Value.ToString, 2) = "作廢" Then 審核人_tb.Text = 系統語言字典("H314-111-" & 語言) & Strings.Mid(財務收支單_dgv.Rows(i).Cells("審核人").Value.ToString, 3, 50) Else : 審核人_tb.Text = 財務收支單_dgv.Rows(i).Cells("審核人").Value : End If If Strings.Left(財務收支單_dgv.Rows(i).Cells("主管人").Value.ToString, 2) = "作廢" Then 主管_tb.Text = 系統語言字典("H314-111-" & 語言) & Strings.Mid(財務收支單_dgv.Rows(i).Cells("主管人").Value.ToString, 3, 50) Else : 主管_tb.Text = 財務收支單_dgv.Rows(i).Cells("主管人").Value.ToString : End If 申請金額_nud.Value = CLng(財務收支單_dgv.Rows(i).Cells("支出").Value.ToString) : 大寫轉換() If 財務收支單_dgv.Rows(i).Cells(0).Value.ToString.Contains("HXI") Then : PictureBox1.BringToFront() : ElseIf 財務收支單_dgv.Rows(i).Cells(0).Value.ToString.Contains("PGS") Then : PictureBox1.SendToBack() : Else : PictureBox1.BringToFront() : End If PA1 = 財務收支單_dgv.Rows(i).Cells("核准圖檔").Value.ToString : SQL_主管簽名檔管理_圖片流水號() 簽名圖_pb.Image = Nothing While dr.Read() = True Dim unused As Byte() = New Byte(-1) {} Dim bytes As Byte() = DirectCast(dr.Item("簽名檔圖片"), Byte()) Dim oStream As New MemoryStream(bytes) 簽名圖_pb.Image = Bitmap.FromStream(oStream) End While conn.Close() : 簽名圖_pb.SizeMode = 4 Exit For End If Next End If 已開啟 = True End Sub Private Sub 財務收支單_最高主管審核_Closed(sender As Object, e As EventArgs) Handles MyBase.Closed H(314) = False : 跨部門開啟 = False : MyMod.虛擬桌面開啟() End Sub Private Sub 財務收支單_dgv_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles 財務收支單_dgv.CellClick If e.RowIndex = -1 Then : Else 單號_tb.Text = 財務收支單_dgv(0, e.RowIndex).Value.ToString : 申請日期_dtp.Value = 財務收支單_dgv("申請日期", e.RowIndex).Value.ToString 申請人_tb.Text = 財務收支單_dgv(2, e.RowIndex).Value.ToString : 系統單號_bt.Text = 財務收支單_dgv(3, e.RowIndex).Value.ToString 幣別_cb.Text = 財務收支單_dgv(4, e.RowIndex).Value.ToString : 編號1_cb.Text = Strings.Left(財務收支單_dgv("類別", e.RowIndex).Value.ToString, 4) 編號2_cb.Text = Strings.Left(財務收支單_dgv("類別", e.RowIndex).Value.ToString, 7) : 編號3_cb.Text = 財務收支單_dgv("類別", e.RowIndex).Value.ToString 金額大寫_tb.Text = 財務收支單_dgv("大寫", e.RowIndex).Value.ToString : 部門選單_cb.Text = Strings.Mid(財務收支單_dgv(0, e.RowIndex).Value.ToString, 5, 3) 內容_tb.Text = 財務收支單_dgv("明細", e.RowIndex).Value.ToString : 支付對象_tb.Text = 財務收支單_dgv("支付對象", e.RowIndex).Value.ToString 營行帳號_tb.Text = 財務收支單_dgv("公司", e.RowIndex).Value.ToString : 支付銀行_tb.Text = 財務收支單_dgv("付款銀行", e.RowIndex).Value.ToString 銀行支行_tb.Text = 財務收支單_dgv("銀行支行", e.RowIndex).Value.ToString : 檢查人_tb.Text = 財務收支單_dgv("檢查人", e.RowIndex).Value.ToString 主管_tb.Text = 財務收支單_dgv("主管人", e.RowIndex).Value.ToString If 財務收支單_dgv(表頭(20), e.RowIndex).Value.ToString <> "" Then : 支付日期_dtp.Value = 財務收支單_dgv(表頭(20), e.RowIndex).Value : Else : 支付日期_dtp.Value = Today : End If If 財務收支單_dgv(11, e.RowIndex).Value = True Or 財務收支單_dgv(12, e.RowIndex).Value = True Then : 不可編輯x = True : Else : 不可編輯x = False : End If If Strings.Left(財務收支單_dgv.Rows(e.RowIndex).Cells(10).Value.ToString, 2) = "作廢" Then 審核人_tb.Text = 系統語言字典("H314-111-" & 語言) & Strings.Mid(財務收支單_dgv("審核人", e.RowIndex).Value.ToString, 3, 50) Else : 審核人_tb.Text = 財務收支單_dgv("審核人", e.RowIndex).Value.ToString : End If 申請金額_nud.Value = CLng(財務收支單_dgv("支出", e.RowIndex).Value.ToString) : 大寫轉換() If 財務收支單_dgv(0, e.RowIndex).Value.ToString.Contains("HXI") Then : PictureBox1.BringToFront() : ElseIf 財務收支單_dgv(0, e.RowIndex).Value.ToString.Contains("PGS") Then : PictureBox1.SendToBack() : Else : PictureBox1.BringToFront() : End If PA1 = 財務收支單_dgv("核准圖檔", e.RowIndex).Value.ToString : SQL_主管簽名檔管理_圖片流水號() 簽名圖_pb.Image = Nothing While dr.Read() = True Dim unused As Byte() = New Byte(-1) {} Dim bytes As Byte() = DirectCast(dr.Item("簽名檔圖片"), Byte()) Dim oStream As New MemoryStream(bytes) 簽名圖_pb.Image = Bitmap.FromStream(oStream) End While conn.Close() : 簽名圖_pb.SizeMode = 4 翻譯 = 內容_tb.Text : MyModule2.執行翻譯() : 等待翻譯_tim.Enabled = True End If End Sub Private Sub 等待翻譯_tim_Tick(sender As Object, e As EventArgs) Handles 等待翻譯_tim.Tick Dim Str2 As String = System.Windows.Forms.Application.StartupPath : Dim stringReader As String : Dim fileReader As StreamReader If File.Exists("ch.txt") Then 等待翻譯_tim.Enabled = False Dim 回應1, 回應2 As String fileReader = My.Computer.FileSystem.OpenTextFileReader(Str2 & "\ch.txt") : stringReader = fileReader.ReadToEnd() : 回應1 = stringReader : fileReader.Close() fileReader = My.Computer.FileSystem.OpenTextFileReader(Str2 & "\in.txt") : stringReader = fileReader.ReadToEnd() : 回應2 = stringReader : fileReader.Close() 內容_tb.Text = 回應1 & vbCrLf & vbCrLf & 回應2 ElseIf File.Exists(Str2 & "\ch.txt") Then 等待翻譯_tim.Enabled = False Dim 回應1, 回應2 As String fileReader = My.Computer.FileSystem.OpenTextFileReader(Str2 & "\ch.txt") : stringReader = fileReader.ReadToEnd() : 回應1 = stringReader : fileReader.Close() fileReader = My.Computer.FileSystem.OpenTextFileReader(Str2 & "\in.txt") : stringReader = fileReader.ReadToEnd() : 回應2 = stringReader : fileReader.Close() 內容_tb.Text = 回應1 & vbCrLf & vbCrLf & 回應2 End If End Sub Private Sub ComboBox5_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 第一層_cb.TextChanged 編號1_cb.SelectedIndex = 第一層_cb.SelectedIndex : 查詢_tb.Text = "" : 第二層下拉表單資料載入() : 第三層下拉表單資料載入() End Sub Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 編號1_cb.TextChanged 第一層_cb.SelectedIndex = 編號1_cb.SelectedIndex : 第二層下拉表單資料載入() : 第三層下拉表單資料載入() End Sub Private Sub ComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 第二層_cb.TextChanged 編號2_cb.SelectedIndex = 第二層_cb.SelectedIndex : 第三層下拉表單資料載入() End Sub Private Sub ComboBox4_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 編號2_cb.TextChanged 第二層_cb.SelectedIndex = 編號2_cb.SelectedIndex : 第三層下拉表單資料載入() End Sub Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 第三層_cb.SelectedIndexChanged 編號3_cb.SelectedIndex = 第三層_cb.SelectedIndex End Sub Private Sub ComboBox6_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 編號3_cb.SelectedIndexChanged 第三層_cb.SelectedIndex = 編號3_cb.SelectedIndex End Sub Private Sub 第三層下拉表單資料載入() PA26 = 編號2_cb.Text : SQL_財務單會計科目3() : 第三層_cb.Items.Clear() : 編號3_cb.Items.Clear() : 第三層_cb.Items.Add("") : 編號3_cb.Items.Add("") While (dr.Read()) : 第三層_cb.Items.Add(dr("會計科目")) : 編號3_cb.Items.Add(dr("編號")) : End While : conn.Close() If 第三層_cb.Items.Count <> 0 Then : 第三層_cb.SelectedIndex = 0 : End If End Sub Private Sub 第一層下拉表單資料載入() SQL_財務單會計科目1() : 第一層_cb.Items.Clear() : 編號1_cb.Items.Clear() While (dr.Read()) : 第一層_cb.Items.Add(dr("第一階")) : 編號1_cb.Items.Add(dr("編號")) : End While : conn.Close() : 第一層_cb.Text = "" : 編號1_cb.Text = "" End Sub Private Sub 第二層下拉表單資料載入() PA25 = 編號1_cb.Text : SQL_財務單會計科目2() : 第二層_cb.Items.Clear() : 編號2_cb.Items.Clear() : 第二層_cb.Items.Add("") : 編號2_cb.Items.Add("") While (dr.Read()) : 第二層_cb.Items.Add(dr("第二階")) : 編號2_cb.Items.Add(dr("編號")) : End While : conn.Close() : 第二層_cb.Text = "" : 編號2_cb.Text = "" End Sub Private Sub 大寫轉換() Dim 個位(20), 十位(9), 百位(1), 千位(1), 百萬, 十億, 零, 拾, 百, 仟, 萬, 億, 兆, 答案 As String : Dim 數長 As Integer If 系統語言 = "繁體中文" Then 個位(0) = "零" : 個位(1) = "壹" : 個位(2) = "貳" : 個位(3) = "參" : 個位(4) = "肆" : 個位(5) = "伍" : 個位(6) = "陸" : 個位(7) = "柒" : 個位(8) = "捌" : 個位(9) = "玖" 零 = "零" : 拾 = "拾" : 百 = "百" : 仟 = "仟" : 萬 = "萬" : 億 = "億" : 兆 = "兆" ElseIf 系統語言 = "Indonesian" Then 個位(0) = "Nol" : 個位(1) = "Satu" : 個位(2) = "Dua" : 個位(3) = "Tiga" : 個位(4) = "Empat" : 個位(5) = "Lima" : 個位(6) = "Enam" : 個位(7) = "Tujuh" 個位(8) = "Delapan" : 個位(9) = "Sembilan" : 個位(10) = "Sepuluh" : 個位(11) = "Sebelas" : 個位(12) = "Dua Belas" : 個位(13) = "Tiga Belas" : 個位(14) = "Empat Belas" 個位(15) = "Lima Belas" : 個位(16) = "Enam Belas" : 個位(17) = "Tujuh Belas" : 個位(18) = "Delapan Belas" : 個位(19) = "Sembilan Belas" : 個位(20) = "Dua Puluh" 十位(1) = "Sepuluh" : 十位(2) = "Dua Puluh" : 十位(3) = "Tiga Puluh" : 十位(4) = "Empat Puluh" : 十位(5) = "Lima Puluh" : 十位(6) = "Enam Puluh" : 十位(7) = "Tujuh Puluh" 十位(8) = "Delapan Puluh" : 十位(9) = "Sembilan Puluh" 百位(0) = "Seratus" : 百位(1) = "Ratus" : 千位(0) = "Seribu" : 千位(1) = "Ribu" : 百萬 = "Juta" : 十億 = "Miliar" : 兆 = "Triliun" ElseIf 系統語言 = "English" Then 個位(0) = "Zero" : 個位(1) = "One" : 個位(2) = "Two" : 個位(3) = "Three" : 個位(4) = "Four" : 個位(5) = "Five" : 個位(6) = "Six" : 個位(7) = "Seven" 個位(8) = "Eight" : 個位(9) = "Nine" : 個位(10) = "Ten" : 個位(11) = "Eleven" : 個位(12) = "Twelve" : 個位(13) = "Thirteen" : 個位(14) = "Fourteen" 個位(15) = "Fifteen" : 個位(16) = "Sixteen" : 個位(17) = "Seventeen" : 個位(18) = "Eighteen" : 個位(19) = "Nineteen" : 個位(20) = "Twenty" 十位(1) = "Ten" : 十位(2) = "Twenty" : 十位(3) = "Thirty" : 十位(4) = "Forty" : 十位(5) = "Fifty" : 十位(6) = "Sixty" : 十位(7) = "Seventy" : 十位(8) = "Eighty" 十位(9) = "Ninety" 百位(0) = "One Hundred" : 百位(1) = "Hundred" : 千位(0) = "One Thousand" : 千位(1) = "Thousand" : 百萬 = "Million" : 十億 = "Billion" : 兆 = "Trillion" End If '--------------轉大寫----------------------------------------------------------- Dim 位數(13), 末位數 As String Dim NB As Long = 申請金額_nud.Value : Dim NBS As String = NB.ToString() : 數長 = NBS.Length 位數(1) = Strings.Left(NBS, 1) : 末位數 = Strings.Right(NBS, 1) If 數長 >= 2 Then : 位數(2) = Strings.Mid(NBS, 2, 1) : End If : If 數長 >= 3 Then : 位數(3) = Strings.Mid(NBS, 3, 1) : End If If 數長 >= 4 Then : 位數(4) = Strings.Mid(NBS, 4, 1) : End If : If 數長 >= 5 Then : 位數(5) = Strings.Mid(NBS, 5, 1) : End If If 數長 >= 6 Then : 位數(6) = Strings.Mid(NBS, 6, 1) : End If : If 數長 >= 7 Then : 位數(7) = Strings.Mid(NBS, 7, 1) : End If If 數長 >= 8 Then : 位數(8) = Strings.Mid(NBS, 8, 1) : End If : If 數長 >= 9 Then : 位數(9) = Strings.Mid(NBS, 9, 1) : End If If 數長 >= 10 Then : 位數(10) = Strings.Mid(NBS, 10, 1) : End If : If 數長 >= 11 Then : 位數(11) = Strings.Mid(NBS, 11, 1) : End If If 數長 >= 12 Then : 位數(12) = Strings.Mid(NBS, 12, 1) : End If : If 數長 >= 13 Then : 位數(13) = Strings.Mid(NBS, 13, 1) : End If If 系統語言 <> "繁體中文" Then If 申請金額_nud.Value < 21 Then : 答案 = 個位(申請金額_nud.Value) ElseIf 數長 = 2 Then If 位數(2) <> "0" And 末位數 = "0" Then : 答案 = 十位(位數(1)) ElseIf 位數(2) <> "0" And 末位數 <> "0" Then : 答案 = 十位(位數(1)) & " " & 個位(末位數) : End If ElseIf 數長 = 3 Then '------------------百------------------------------------------------------------------------------------------------------ If 位數(1) = "1" Then : 答案 = 百位(0) : ElseIf 位數(1) <> "1" Then : 答案 = 個位(位數(1)) & " " & 百位(1) : End If '------------------個十------------------------------------------------------------------------------------------------------ If 位數(2) = "0" And 末位數 = "0" Then ElseIf 位數(2) = "0" And 末位數 <> "0" Then : 答案 &= " " & 個位(末位數) Else If CInt(位數(2) & 末位數) < 21 Then If 末位數 = "0" Then : 答案 &= " " & 十位(位數(2)) : Else : 答案 &= " " & 個位(位數(2) & 末位數) : End If Else If 位數(2) <> "0" And 末位數 = "0" Then : 答案 &= " " & 十位(位數(2)) ElseIf 位數(2) <> "0" And 末位數 <> "0" Then : 答案 &= " " & 十位(位數(2)) & " " & 個位(末位數) : End If End If End If ElseIf 數長 = 4 Then '------------------千------------------------------------------------------------------------------------------------------ If 位數(1) = "1" Then : 答案 = 千位(0) ElseIf 位數(1) <> "1" Then : 答案 = 個位(位數(1)) & " " & 千位(1) : End If '------------------百------------------------------------------------------------------------------------------------------ If CInt(位數(2) & 位數(3) & 末位數) < 100 Then ElseIf CInt(位數(2) & 位數(3) & 末位數) < 200 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(2) & 位數(3) & 末位數) >= 200 Then : 答案 &= " " & 個位(位數(2)) & " " & 百位(1) : End If '------------------個十------------------------------------------------------------------------------------------------------ If 位數(3) = "0" And 末位數 = "0" Then ElseIf 位數(3) = "0" And 末位數 <> "0" Then : 答案 &= " " & 個位(末位數) Else If CInt(位數(3) & 末位數) < 21 Then If 末位數 = "0" Then : 答案 &= " " & 十位(位數(3)) : Else : 答案 &= " " & 個位(位數(3) & 末位數) : End If Else If 位數(3) <> "0" And 末位數 = "0" Then : 答案 &= " " & 十位(位數(3)) ElseIf 位數(3) <> "0" And 末位數 <> "0" Then : 答案 &= " " & 十位(位數(3)) & " " & 個位(末位數) : End If End If End If ElseIf 數長 = 5 Then '------------------十千(萬)------------------------------------------------------------------------------------------------------ If CInt(位數(1) & 位數(2)) < 21 Then If 位數(2) = "0" Then : 答案 = 十位(位數(1)) & " " & 千位(1) : Else : 答案 = 個位(位數(1) & 位數(2)) & " " & 千位(1) : End If Else If 位數(1) <> "0" And 位數(2) = "0" Then : 答案 = 十位(位數(1)) & " " & 千位(1) ElseIf 位數(1) <> "0" And 位數(2) <> "0" Then : 答案 = 十位(位數(1)) & " " & 個位(位數(2)) & " " & 千位(1) : End If End If '------------------百------------------------------------------------------------------------------------------------------ If CInt(位數(3) & 位數(4) & 末位數) < 100 Then ElseIf CInt(位數(3) & 位數(4) & 末位數) < 200 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(3) & 位數(4) & 末位數) >= 200 Then : 答案 &= " " & 個位(位數(3)) & " " & 百位(1) : End If '------------------個十------------------------------------------------------------------------------------------------------ If 位數(4) = "0" And 末位數 = "0" Then ElseIf 位數(4) = "0" And 末位數 <> "0" Then : 答案 &= " " & 個位(末位數) Else If CInt(位數(4) & 末位數) < 21 Then If 末位數 = "0" Then : 答案 &= " " & 十位(位數(4)) : Else : 答案 &= " " & 個位(位數(4) & 末位數) : End If Else If 位數(4) <> "0" And 末位數 = "0" Then : 答案 &= " " & 十位(位數(4)) ElseIf 位數(4) <> "0" And 末位數 <> "0" Then : 答案 &= " " & 十位(位數(4)) & " " & 個位(末位數) : End If End If End If ElseIf 數長 = 6 Then '------------------百千(十萬)------------------------------------------------------------------------------------------------------ If CInt(位數(1)) = 1 Then : 答案 = 百位(0) : Else : 答案 = 個位(位數(1)) & " " & 百位(1) : End If '------------------十千(萬)------------------------------------------------------------------------------------------------------ If CInt(位數(2) & 位數(3)) < 21 Then If 位數(3) = "0" Then : 答案 &= " " & 十位(位數(2)) & " " & 千位(1) : Else : 答案 &= " " & 個位(位數(2) & 位數(3)) & " " & 千位(1) : End If Else If 位數(2) <> "0" And 位數(3) = "0" Then : 答案 &= " " & 十位(位數(2)) & " " & 千位(1) ElseIf 位數(2) <> "0" And 位數(3) <> "0" Then : 答案 &= " " & 十位(位數(2)) & " " & 個位(位數(3)) & " " & 千位(1) : End If End If '------------------百------------------------------------------------------------------------------------------------------ If CInt(位數(4) & 位數(5) & 末位數) < 100 Then ElseIf CInt(位數(4) & 位數(5) & 末位數) < 200 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(4) & 位數(5) & 末位數) >= 200 Then : 答案 &= " " & 個位(位數(4)) & " " & 百位(1) : End If '------------------個十------------------------------------------------------------------------------------------------------ If 位數(5) = "0" And 末位數 = "0" Then ElseIf 位數(5) = "0" And 末位數 <> "0" Then : 答案 &= " " & 個位(末位數) Else If CInt(位數(5) & 末位數) < 21 Then If 末位數 = "0" Then : 答案 &= " " & 十位(位數(5)) : Else : 答案 &= " " & 個位(位數(5) & 末位數) : End If Else If 位數(5) <> "0" And 末位數 = "0" Then : 答案 &= " " & 十位(位數(5)) ElseIf 位數(5) <> "0" And 末位數 <> "0" Then : 答案 &= " " & 十位(位數(5)) & " " & 個位(末位數) : End If End If End If ElseIf 數長 = 7 Then '------------------百萬------------------------------------------------------------------------------------------------------ 答案 = 個位(位數(1)) & " " & 百萬 '------------------百千(十萬)------------------------------------------------------------------------------------------------------ If CInt(位數(2)) = 0 Then : ElseIf CInt(位數(2)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(2)) > 1 Then : 答案 &= " " & 個位(位數(2)) & " " & 百位(1) : End If '------------------十千(萬)------------------------------------------------------------------------------------------------------ If 位數(2) = "0" And 位數(3) = "0" And 位數(4) = "0" Then : Else If CInt(位數(3) & 位數(4)) < 21 Then If 位數(3) = "0" And 位數(4) = "0" Then : 答案 &= " " & 千位(1) ElseIf 位數(3) = "0" And 位數(4) <> "0" Then : 答案 &= " " & 個位(位數(4)) & " " & 千位(1) ElseIf 位數(3) <> "0" And 位數(4) = "0" Then : 答案 &= " " & 十位(位數(3)) & " " & 千位(1) ElseIf 位數(3) <> "0" And 位數(4) <> "0" Then : 答案 &= " " & 個位(位數(3) & 位數(4)) & " " & 千位(1) : End If Else If 位數(3) <> "0" And 位數(4) = "0" Then : 答案 &= " " & 十位(位數(3)) & " " & 千位(1) ElseIf 位數(3) <> "0" And 位數(4) <> "0" Then : 答案 &= " " & 十位(位數(3)) & " " & 個位(位數(4)) & " " & 千位(1) : End If End If End If '------------------百------------------------------------------------------------------------------------------------------ If CInt(位數(5) & 位數(6) & 末位數) < 100 Then ElseIf CInt(位數(5) & 位數(6) & 末位數) < 200 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(5) & 位數(6) & 末位數) >= 200 Then : 答案 &= " " & 個位(位數(5)) & " " & 百位(1) : End If '------------------個十------------------------------------------------------------------------------------------------------ If 位數(6) = "0" And 末位數 = "0" Then ElseIf 位數(6) = "0" And 末位數 <> "0" Then : 答案 &= " " & 個位(末位數) Else If CInt(位數(6) & 末位數) < 21 Then If 末位數 = "0" Then : 答案 &= " " & 十位(位數(6)) : Else : 答案 &= " " & 個位(位數(6) & 末位數) : End If Else If 位數(6) <> "0" And 末位數 = "0" Then : 答案 &= " " & 十位(位數(6)) ElseIf 位數(6) <> "0" And 末位數 <> "0" Then : 答案 &= " " & 十位(位數(6)) & " " & 個位(末位數) : End If End If End If ElseIf 數長 = 8 Then '------------------十百萬(千萬)------------------------------------------------------------------------------------------------------ If CInt(位數(1) & 位數(2)) < 21 Then If 位數(2) = "0" Then : 答案 = 十位(位數(1)) & " " & 百萬 : Else : 答案 = 個位(位數(1) & 位數(2)) & " " & 百萬 : End If Else If 位數(1) <> "0" And 位數(2) = "0" Then : 答案 = 十位(位數(1)) & " " & 百萬 ElseIf 位數(1) <> "0" And 位數(2) <> "0" Then : 答案 = 十位(位數(1)) & " " & 個位(位數(2)) & " " & 百萬 : End If End If '------------------百千(十萬)------------------------------------------------------------------------------------------------------ If CInt(位數(3)) = 0 Then : ElseIf CInt(位數(3)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(3)) > 1 Then : 答案 &= " " & 個位(位數(3)) & " " & 百位(1) : End If '------------------十千(萬)------------------------------------------------------------------------------------------------------ If 位數(3) = "0" And 位數(4) = "0" And 位數(5) = "0" Then : Else If CInt(位數(4) & 位數(5)) < 21 Then If 位數(4) = "0" And 位數(5) = "0" Then : 答案 &= " " & 千位(1) ElseIf 位數(4) = "0" And 位數(5) <> "0" Then : 答案 &= " " & 個位(位數(5)) & " " & 千位(1) ElseIf 位數(4) <> "0" And 位數(5) = "0" Then : 答案 &= " " & 十位(位數(4)) & " " & 千位(1) ElseIf 位數(4) <> "0" And 位數(5) <> "0" Then : 答案 &= " " & 個位(位數(4) & 位數(5)) & " " & 千位(1) : End If Else If 位數(4) <> "0" And 位數(5) = "0" Then : 答案 &= " " & 十位(位數(4)) & " " & 千位(1) ElseIf 位數(4) <> "0" And 位數(5) <> "0" Then : 答案 &= " " & 十位(位數(4)) & " " & 個位(位數(5)) & " " & 千位(1) : End If End If End If '------------------百------------------------------------------------------------------------------------------------------ If CInt(位數(6) & 位數(7) & 末位數) < 100 Then ElseIf CInt(位數(6) & 位數(7) & 末位數) < 200 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(6) & 位數(7) & 末位數) >= 200 Then : 答案 &= " " & 個位(位數(6)) & " " & 百位(1) : End If '------------------個十------------------------------------------------------------------------------------------------------ If 位數(7) = "0" And 末位數 = "0" Then ElseIf 位數(7) = "0" And 末位數 <> "0" Then : 答案 &= " " & 個位(末位數) Else If CInt(位數(7) & 末位數) < 21 Then If 末位數 = "0" Then : 答案 &= " " & 十位(位數(7)) : Else : 答案 &= " " & 個位(位數(7) & 末位數) : End If Else If 位數(7) <> "0" And 末位數 = "0" Then : 答案 &= " " & 十位(位數(7)) ElseIf 位數(7) <> "0" And 末位數 <> "0" Then : 答案 &= " " & 十位(位數(7)) & " " & 個位(末位數) : End If End If End If ElseIf 數長 = 9 Then '------------------百百萬(億)------------------------------------------------------------------------------------------------------ If CInt(位數(1)) = 1 Then : 答案 = 百位(0) : ElseIf CInt(位數(1)) > 1 Then : 答案 = 個位(位數(1)) & " " & 百位(1) : End If '------------------十百萬(千萬)------------------------------------------------------------------------------------------------------ If 位數(2) = "0" And 位數(3) = "0" Then : 答案 &= " " & 百萬 ElseIf 位數(2) = "0" And 位數(3) <> "0" Then : 答案 &= " " & 個位(位數(3)) & " " & 百萬 ElseIf CInt(位數(2) & 位數(3)) < 21 Then If 位數(3) = "0" Then : 答案 &= " " & 十位(位數(2)) & " " & 百萬 : Else : 答案 &= " " & 個位(位數(2) & 位數(3)) & " " & 百萬 : End If ElseIf CInt(位數(2) & 位數(3)) >= 21 Then If 位數(2) <> "0" And 位數(3) = "0" Then : 答案 &= " " & 十位(位數(2)) & " " & 百萬 ElseIf 位數(2) <> "0" And 位數(3) <> "0" Then : 答案 &= " " & 十位(位數(2)) & " " & 個位(位數(3)) & " " & 百萬 : End If End If '------------------百千(十萬)------------------------------------------------------------------------------------------------------ If CInt(位數(4)) = 0 Then : ElseIf CInt(位數(4)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(4)) > 1 Then : 答案 &= " " & 個位(位數(4)) & " " & 百位(1) : End If '------------------十千(萬)------------------------------------------------------------------------------------------------------ If 位數(4) = "0" And 位數(5) = "0" And 位數(6) = "0" Then : Else If CInt(位數(5) & 位數(6)) < 21 Then If 位數(5) = "0" And 位數(6) = "0" Then : 答案 &= " " & 千位(1) ElseIf 位數(5) = "0" And 位數(6) <> "0" Then : 答案 &= " " & 個位(位數(6)) & " " & 千位(1) ElseIf 位數(5) <> "0" And 位數(6) = "0" Then : 答案 &= " " & 十位(位數(5)) & " " & 千位(1) ElseIf 位數(5) <> "0" And 位數(6) <> "0" Then : 答案 &= " " & 個位(位數(5) & 位數(6)) & " " & 千位(1) : End If Else If 位數(5) <> "0" And 位數(6) = "0" Then : 答案 &= " " & 十位(位數(5)) & " " & 千位(1) ElseIf 位數(5) <> "0" And 位數(6) <> "0" Then : 答案 &= " " & 十位(位數(5)) & " " & 個位(位數(6)) & " " & 千位(1) : End If End If End If '------------------百------------------------------------------------------------------------------------------------------ If CInt(位數(7) & 位數(8) & 末位數) < 100 Then ElseIf CInt(位數(7) & 位數(8) & 末位數) < 200 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(7) & 位數(8) & 末位數) >= 200 Then : 答案 &= " " & 個位(位數(7)) & " " & 百位(1) : End If '------------------個十------------------------------------------------------------------------------------------------------ If 位數(8) = "0" And 末位數 = "0" Then ElseIf 位數(8) = "0" And 末位數 <> "0" Then : 答案 &= " " & 個位(末位數) Else If CInt(位數(8) & 末位數) < 21 Then If 末位數 = "0" Then : 答案 &= " " & 十位(位數(8)) : Else : 答案 &= " " & 個位(位數(8) & 末位數) : End If Else If 位數(8) <> "0" And 末位數 = "0" Then : 答案 &= " " & 十位(位數(8)) ElseIf 位數(8) <> "0" And 末位數 <> "0" Then : 答案 &= " " & 十位(位數(8)) & " " & 個位(末位數) : End If End If End If ElseIf 數長 = 10 Then '------------------十億------------------------------------------------------------------------------------------------------ 答案 = 個位(位數(1)) & " " & 十億 '------------------百百萬(億)------------------------------------------------------------------------------------------------------ If CInt(位數(2)) = 0 Then ElseIf CInt(位數(2)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(2)) > 1 Then : 答案 &= " " & 個位(位數(2)) & " " & 百位(1) : End If '------------------十百萬(千萬)------------------------------------------------------------------------------------------------------ If 位數(2) = "0" And 位數(3) = "0" And 位數(4) = "0" Then ElseIf 位數(3) = "0" And 位數(4) = "0" Then : 答案 &= " " & 百萬 ElseIf 位數(3) = "0" And 位數(4) <> "0" Then : 答案 &= " " & 個位(位數(4)) & " " & 百萬 ElseIf CInt(位數(3) & 位數(4)) < 21 Then If 位數(4) = "0" Then : 答案 &= " " & 十位(位數(3)) & " " & 百萬 : Else : 答案 &= " " & 個位(位數(3) & 位數(4)) & " " & 百萬 : End If ElseIf CInt(位數(3) & 位數(4)) >= 21 Then If 位數(3) <> "0" And 位數(4) = "0" Then : 答案 &= " " & 十位(位數(3)) & " " & 百萬 ElseIf 位數(3) <> "0" And 位數(4) <> "0" Then : 答案 &= " " & 十位(位數(3)) & " " & 個位(位數(4)) & " " & 百萬 : End If End If '------------------百千(十萬)------------------------------------------------------------------------------------------------------ If CInt(位數(5)) = 0 Then : ElseIf CInt(位數(5)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(5)) > 1 Then : 答案 &= " " & 個位(位數(5)) & " " & 百位(1) : End If '------------------十千(萬)------------------------------------------------------------------------------------------------------ If CInt(位數(6) & 位數(7)) < 21 Then If 位數(5) = "0" And 位數(6) = "0" And 位數(7) = "0" Then ElseIf 位數(6) = "0" And 位數(7) = "0" Then : 答案 &= " " & 千位(1) ElseIf 位數(6) = "0" And 位數(7) <> "0" Then : 答案 &= " " & 個位(位數(7)) & " " & 千位(1) ElseIf 位數(6) <> "0" And 位數(7) = "0" Then : 答案 &= " " & 十位(位數(6)) & " " & 千位(1) ElseIf 位數(6) <> "0" And 位數(7) <> "0" Then : 答案 &= " " & 個位(位數(6) & 位數(7)) & " " & 千位(1) : End If Else If 位數(6) <> "0" And 位數(7) = "0" Then : 答案 &= " " & 十位(位數(6)) & " " & 千位(1) ElseIf 位數(6) <> "0" And 位數(7) <> "0" Then : 答案 &= " " & 十位(位數(6)) & " " & 個位(位數(7)) & " " & 千位(1) : End If End If '------------------百------------------------------------------------------------------------------------------------------ If CInt(位數(8) & 位數(9) & 末位數) < 100 Then ElseIf CInt(位數(8) & 位數(9) & 末位數) < 200 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(8) & 位數(9) & 末位數) >= 200 Then : 答案 &= " " & 個位(位數(8)) & " " & 百位(1) : End If '------------------個十------------------------------------------------------------------------------------------------------ If 位數(9) = "0" And 末位數 = "0" Then ElseIf 位數(9) = "0" And 末位數 <> "0" Then : 答案 &= " " & 個位(末位數) Else If CInt(位數(9) & 末位數) < 21 Then If 末位數 = "0" Then : 答案 &= " " & 十位(位數(9)) : Else : 答案 &= " " & 個位(位數(9) & 末位數) : End If Else If 位數(9) <> "0" And 末位數 = "0" Then : 答案 &= " " & 十位(位數(9)) ElseIf 位數(9) <> "0" And 末位數 <> "0" Then : 答案 &= " " & 十位(位數(9)) & " " & 個位(末位數) : End If End If End If ElseIf 數長 = 11 Then '------------------十十億(百億)------------------------------------------------------------------------------------------------------ If CInt(位數(1) & 位數(2)) < 21 Then If 位數(2) = "0" Then : 答案 = 十位(位數(1)) & " " & 十億 : Else : 答案 = 個位(位數(1) & 位數(2)) & " " & 十億 : End If Else If 位數(1) <> "0" And 位數(2) = "0" Then : 答案 = 十位(位數(1)) & " " & 十億 ElseIf 位數(1) <> "0" And 位數(2) <> "0" Then : 答案 = 十位(位數(1)) & " " & 個位(位數(2)) & " " & 十億 : End If End If '------------------百百萬(億)------------------------------------------------------------------------------------------------------ If CInt(位數(3)) = 0 Then ElseIf CInt(位數(3)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(3)) > 1 Then : 答案 &= " " & 個位(位數(3)) & " " & 百位(1) : End If '------------------十百萬(千萬)------------------------------------------------------------------------------------------------------ If 位數(3) = "0" And 位數(4) = "0" And 位數(5) = "0" Then ElseIf 位數(4) = "0" And 位數(5) = "0" Then : 答案 &= " " & 百萬 ElseIf 位數(4) = "0" And 位數(5) <> "0" Then : 答案 &= " " & 個位(位數(5)) & " " & 百萬 ElseIf CInt(位數(4) & 位數(5)) < 21 Then If 位數(5) = "0" Then : 答案 &= " " & 十位(位數(4)) & " " & 百萬 : Else : 答案 &= " " & 個位(位數(4) & 位數(5)) & " " & 百萬 : End If ElseIf CInt(位數(4) & 位數(5)) >= 21 Then If 位數(4) <> "0" And 位數(5) = "0" Then : 答案 &= " " & 十位(位數(4)) & " " & 百萬 ElseIf 位數(4) <> "0" And 位數(5) <> "0" Then : 答案 &= " " & 十位(位數(4)) & " " & 個位(位數(5)) & " " & 百萬 : End If End If '------------------百千(十萬)------------------------------------------------------------------------------------------------------ If CInt(位數(6)) = 0 Then : ElseIf CInt(位數(6)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(6)) > 1 Then : 答案 &= " " & 個位(位數(6)) & " " & 百位(1) : End If '------------------十千(萬)------------------------------------------------------------------------------------------------------ If CInt(位數(7) & 位數(8)) < 21 Then If 位數(6) = "0" And 位數(7) = "0" And 位數(8) = "0" Then ElseIf 位數(7) = "0" And 位數(8) = "0" Then : 答案 &= " " & 千位(1) ElseIf 位數(7) = "0" And 位數(8) <> "0" Then : 答案 &= " " & 個位(位數(8)) & " " & 千位(1) ElseIf 位數(7) <> "0" And 位數(8) = "0" Then : 答案 &= " " & 十位(位數(7)) & " " & 千位(1) ElseIf 位數(7) <> "0" And 位數(8) <> "0" Then : 答案 &= " " & 個位(位數(7) & 位數(8)) & " " & 千位(1) : End If Else If 位數(7) <> "0" And 位數(8) = "0" Then : 答案 &= " " & 十位(位數(7)) & " " & 千位(1) ElseIf 位數(7) <> "0" And 位數(8) <> "0" Then : 答案 &= " " & 十位(位數(7)) & " " & 個位(位數(8)) & " " & 千位(1) : End If End If '------------------百------------------------------------------------------------------------------------------------------ If CInt(位數(9) & 位數(10) & 末位數) < 100 Then ElseIf CInt(位數(9) & 位數(10) & 末位數) < 200 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(9) & 位數(10) & 末位數) >= 200 Then : 答案 &= " " & 個位(位數(9)) & " " & 百位(1) : End If '------------------個十------------------------------------------------------------------------------------------------------ If 位數(10) = "0" And 末位數 = "0" Then ElseIf 位數(10) = "0" And 末位數 <> "0" Then : 答案 &= " " & 個位(末位數) Else If CInt(位數(10) & 末位數) < 21 Then If 末位數 = "0" Then : 答案 &= " " & 十位(位數(10)) : Else : 答案 &= " " & 個位(位數(10) & 末位數) : End If Else If 位數(10) <> "0" And 末位數 = "0" Then : 答案 &= " " & 十位(位數(10)) ElseIf 位數(10) <> "0" And 末位數 <> "0" Then : 答案 &= " " & 十位(位數(10)) & " " & 個位(末位數) : End If End If End If ElseIf 數長 = 12 Then '------------------百(千億)------------------------------------------------------------------------------------------------------ If 位數(1) = "1" Then : 答案 = 百位(0) : ElseIf 位數(1) <> "1" Then : 答案 = 個位(位數(1)) & " " & 百位(1) : End If '------------------十十億(百億)------------------------------------------------------------------------------------------------------ If 位數(2) = "0" And 位數(3) = "0" Then : 答案 &= " " & 十億 ElseIf CInt(位數(2) & 位數(3)) < 21 Then If 位數(3) = "0" Then : 答案 &= " " & 十位(位數(2)) & " " & 十億 : Else : 答案 &= " " & 個位(位數(2) & 位數(3)) & " " & 十億 : End If Else If 位數(2) <> "0" And 位數(3) = "0" Then : 答案 &= " " & 十位(位數(2)) & " " & 十億 ElseIf 位數(2) <> "0" And 位數(3) <> "0" Then : 答案 &= " " & 十位(位數(2)) & " " & 個位(位數(3)) & " " & 十億 : End If End If '------------------百百萬(億)------------------------------------------------------------------------------------------------------ If CInt(位數(4)) = 0 Then ElseIf CInt(位數(4)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(4)) > 1 Then : 答案 &= " " & 個位(位數(4)) & " " & 百位(1) : End If '------------------十百萬(千萬)------------------------------------------------------------------------------------------------------ If 位數(4) = "0" And 位數(5) = "0" And 位數(6) = "0" Then ElseIf 位數(5) = "0" And 位數(6) = "0" Then : 答案 &= " " & 百萬 ElseIf 位數(5) = "0" And 位數(6) <> "0" Then : 答案 &= " " & 個位(位數(6)) & " " & 百萬 ElseIf CInt(位數(5) & 位數(6)) < 21 Then If 位數(6) = "0" Then : 答案 &= " " & 十位(位數(5)) & " " & 百萬 : Else : 答案 &= " " & 個位(位數(5) & 位數(6)) & " " & 百萬 : End If ElseIf CInt(位數(5) & 位數(6)) >= 21 Then If 位數(5) <> "0" And 位數(6) = "0" Then : 答案 &= " " & 十位(位數(5)) & " " & 百萬 ElseIf 位數(5) <> "0" And 位數(6) <> "0" Then : 答案 &= " " & 十位(位數(5)) & " " & 個位(位數(6)) & " " & 百萬 : End If End If '------------------百千(十萬)------------------------------------------------------------------------------------------------------ If CInt(位數(7)) = 0 Then : ElseIf CInt(位數(7)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(7)) > 1 Then : 答案 &= " " & 個位(位數(7)) & " " & 百位(1) : End If '------------------十千(萬)------------------------------------------------------------------------------------------------------ If CInt(位數(8) & 位數(9)) < 21 Then If 位數(7) = "0" And 位數(8) = "0" And 位數(9) = "0" Then ElseIf 位數(8) = "0" And 位數(9) = "0" Then : 答案 &= " " & 千位(1) ElseIf 位數(8) = "0" And 位數(9) <> "0" Then : 答案 &= " " & 個位(位數(9)) & " " & 千位(1) ElseIf 位數(8) <> "0" And 位數(9) = "0" Then : 答案 &= " " & 十位(位數(8)) & " " & 千位(1) ElseIf 位數(8) <> "0" And 位數(9) <> "0" Then : 答案 &= " " & 個位(位數(8) & 位數(9)) & " " & 千位(1) : End If Else If 位數(8) <> "0" And 位數(9) = "0" Then : 答案 &= " " & 十位(位數(8)) & " " & 千位(1) ElseIf 位數(8) <> "0" And 位數(9) <> "0" Then : 答案 &= " " & 十位(位數(8)) & " " & 個位(位數(9)) & " " & 千位(1) : End If End If '------------------百------------------------------------------------------------------------------------------------------ If CInt(位數(10) & 位數(11) & 末位數) < 100 Then ElseIf CInt(位數(10) & 位數(11) & 末位數) < 200 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(10) & 位數(11) & 末位數) >= 200 Then : 答案 &= " " & 個位(位數(10)) & " " & 百位(1) : End If '------------------個十------------------------------------------------------------------------------------------------------ If 位數(11) = "0" And 末位數 = "0" Then ElseIf 位數(11) = "0" And 末位數 <> "0" Then : 答案 &= " " & 個位(末位數) Else If CInt(位數(11) & 末位數) < 21 Then If 末位數 = "0" Then : 答案 &= " " & 十位(位數(11)) : Else : 答案 &= " " & 個位(位數(11) & 末位數) : End If Else If 位數(11) <> "0" And 末位數 = "0" Then : 答案 &= " " & 十位(位數(11)) ElseIf 位數(11) <> "0" And 末位數 <> "0" Then : 答案 &= " " & 十位(位數(11)) & " " & 個位(末位數) : End If End If End If ElseIf 數長 = 13 Then '------------------兆------------------------------------------------------------------------------------------------------ 答案 = 個位(位數(1)) & " " & 兆 '------------------百(千億)------------------------------------------------------------------------------------------------------ If 位數(2) = "0" Then ElseIf 位數(2) = "1" Then : 答案 &= " " & 百位(0) ElseIf 位數(2) <> "1" Then : 答案 &= " " & 個位(位數(2)) & " " & 百位(1) : End If '------------------十十億(百億)------------------------------------------------------------------------------------------------------ If 位數(2) = "0" And 位數(3) = "0" And 位數(4) = "0" Then ElseIf 位數(3) = "0" And 位數(4) = "0" Then : 答案 &= " " & 十億 ElseIf CInt(位數(3) & 位數(4)) < 21 Then If 位數(4) = "0" Then : 答案 &= " " & 十位(位數(3)) & " " & 十億 : Else : 答案 &= " " & 個位(位數(3) & 位數(4)) & " " & 十億 : End If Else If 位數(3) <> "0" And 位數(4) = "0" Then : 答案 &= " " & 十位(位數(3)) & " " & 十億 ElseIf 位數(3) <> "0" And 位數(4) <> "0" Then : 答案 &= " " & 十位(位數(3)) & " " & 個位(位數(4)) & " " & 十億 : End If End If '------------------百百萬(億)------------------------------------------------------------------------------------------------------ If CInt(位數(5)) = 0 Then ElseIf CInt(位數(5)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(5)) > 1 Then : 答案 &= " " & 個位(位數(5)) & " " & 百位(1) : End If '------------------十百萬(千萬)------------------------------------------------------------------------------------------------------ If 位數(5) = "0" And 位數(6) = "0" And 位數(7) = "0" Then ElseIf 位數(6) = "0" And 位數(7) = "0" Then : 答案 &= " " & 百萬 ElseIf 位數(6) = "0" And 位數(7) <> "0" Then : 答案 &= " " & 個位(位數(7)) & " " & 百萬 ElseIf CInt(位數(6) & 位數(7)) < 21 Then If 位數(7) = "0" Then : 答案 &= " " & 十位(位數(6)) & " " & 百萬 : Else : 答案 &= " " & 個位(位數(6) & 位數(7)) & " " & 百萬 : End If ElseIf CInt(位數(6) & 位數(7)) >= 21 Then If 位數(6) <> "0" And 位數(7) = "0" Then : 答案 &= " " & 十位(位數(6)) & " " & 百萬 ElseIf 位數(6) <> "0" And 位數(7) <> "0" Then : 答案 &= " " & 十位(位數(6)) & " " & 個位(位數(7)) & " " & 百萬 : End If End If '------------------百千(十萬)------------------------------------------------------------------------------------------------------ If CInt(位數(8)) = 0 Then : ElseIf CInt(位數(8)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(8)) > 1 Then : 答案 &= " " & 個位(位數(8)) & " " & 百位(1) : End If '------------------十千(萬)------------------------------------------------------------------------------------------------------ If CInt(位數(9) & 位數(10)) < 21 Then If 位數(8) = "0" And 位數(9) = "0" And 位數(10) = "0" Then ElseIf 位數(9) = "0" And 位數(10) = "0" Then : 答案 &= " " & 千位(1) ElseIf 位數(9) = "0" And 位數(10) <> "0" Then : 答案 &= " " & 個位(位數(10)) & " " & 千位(1) ElseIf 位數(9) <> "0" And 位數(10) = "0" Then : 答案 &= " " & 十位(位數(9)) & " " & 千位(1) ElseIf 位數(9) <> "0" And 位數(10) <> "0" Then : 答案 &= " " & 個位(位數(9) & 位數(10)) & " " & 千位(1) : End If Else If 位數(9) <> "0" And 位數(10) = "0" Then : 答案 &= " " & 十位(位數(9)) & " " & 千位(1) ElseIf 位數(9) <> "0" And 位數(10) <> "0" Then : 答案 &= " " & 十位(位數(9)) & " " & 個位(位數(10)) & " " & 千位(1) : End If End If '------------------百------------------------------------------------------------------------------------------------------ If CInt(位數(11) & 位數(12) & 末位數) < 100 Then ElseIf CInt(位數(11) & 位數(12) & 末位數) < 200 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(11) & 位數(12) & 末位數) >= 200 Then : 答案 &= " " & 個位(位數(11)) & " " & 百位(1) : End If '------------------個十------------------------------------------------------------------------------------------------------ If 位數(12) = "0" And 末位數 = "0" Then ElseIf 位數(12) = "0" And 末位數 <> "0" Then : 答案 &= " " & 個位(末位數) Else If CInt(位數(12) & 末位數) < 21 Then If 末位數 = "0" Then : 答案 &= " " & 十位(位數(12)) : Else : 答案 &= " " & 個位(位數(12) & 末位數) : End If Else If 位數(12) <> "0" And 末位數 = "0" Then : 答案 &= " " & 十位(位數(12)) ElseIf 位數(12) <> "0" And 末位數 <> "0" Then : 答案 &= " " & 十位(位數(12)) & " " & 個位(末位數) : End If End If End If ElseIf 數長 = 14 Then '------------------十兆------------------------------------------------------------------------------------------------------ If CInt(位數(1) & 位數(2)) < 21 Then If 位數(2) = "0" Then : 答案 = 十位(位數(1)) & " " & 兆 : Else : 答案 = 個位(位數(1) & 位數(2)) & " " & 兆 : End If Else If 位數(1) <> "0" And 位數(2) = "0" Then : 答案 = 十位(位數(1)) & " " & 兆 ElseIf 位數(1) <> "0" And 位數(2) <> "0" Then : 答案 = 十位(位數(1)) & " " & 個位(位數(2)) & " " & 兆 : End If End If '------------------百(千億)------------------------------------------------------------------------------------------------------ If 位數(3) = "0" Then ElseIf 位數(3) = "1" Then : 答案 &= " " & 百位(0) ElseIf 位數(3) <> "1" Then : 答案 &= " " & 個位(位數(3)) & " " & 百位(1) : End If '------------------十十億(百億)------------------------------------------------------------------------------------------------------ If 位數(3) = "0" And 位數(4) = "0" And 位數(5) = "0" Then ElseIf 位數(4) = "0" And 位數(5) = "0" Then : 答案 &= " " & 十億 ElseIf CInt(位數(4) & 位數(5)) < 21 Then If 位數(5) = "0" Then : 答案 &= " " & 十位(位數(4)) & " " & 十億 : Else : 答案 &= " " & 個位(位數(4) & 位數(5)) & " " & 十億 : End If Else If 位數(4) <> "0" And 位數(5) = "0" Then : 答案 &= " " & 十位(位數(4)) & " " & 十億 ElseIf 位數(4) <> "0" And 位數(5) <> "0" Then : 答案 &= " " & 十位(位數(4)) & " " & 個位(位數(5)) & " " & 十億 : End If End If '------------------百百萬(億)------------------------------------------------------------------------------------------------------ If CInt(位數(6)) = 0 Then ElseIf CInt(位數(6)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(6)) > 1 Then : 答案 &= " " & 個位(位數(6)) & " " & 百位(1) : End If '------------------十百萬(千萬)------------------------------------------------------------------------------------------------------ If 位數(6) = "0" And 位數(7) = "0" And 位數(8) = "0" Then ElseIf 位數(7) = "0" And 位數(8) = "0" Then : 答案 &= " " & 百萬 ElseIf 位數(7) = "0" And 位數(8) <> "0" Then : 答案 &= " " & 個位(位數(8)) & " " & 百萬 ElseIf CInt(位數(7) & 位數(8)) < 21 Then If 位數(8) = "0" Then : 答案 &= " " & 十位(位數(7)) & " " & 百萬 : Else : 答案 &= " " & 個位(位數(7) & 位數(8)) & " " & 百萬 : End If ElseIf CInt(位數(7) & 位數(8)) >= 21 Then If 位數(7) <> "0" And 位數(8) = "0" Then : 答案 &= " " & 十位(位數(7)) & " " & 百萬 ElseIf 位數(7) <> "0" And 位數(8) <> "0" Then : 答案 &= " " & 十位(位數(7)) & " " & 個位(位數(8)) & " " & 百萬 : End If End If '------------------百千(十萬)------------------------------------------------------------------------------------------------------ If CInt(位數(9)) = 0 Then : ElseIf CInt(位數(9)) = 1 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(9)) > 1 Then : 答案 &= " " & 個位(位數(9)) & " " & 百位(1) : End If '------------------十千(萬)------------------------------------------------------------------------------------------------------ If CInt(位數(10) & 位數(11)) < 21 Then If 位數(9) = "0" And 位數(10) = "0" And 位數(11) = "0" Then ElseIf 位數(10) = "0" And 位數(11) = "0" Then : 答案 &= " " & 千位(1) ElseIf 位數(10) = "0" And 位數(11) <> "0" Then : 答案 &= " " & 個位(位數(11)) & " " & 千位(1) ElseIf 位數(10) <> "0" And 位數(11) = "0" Then : 答案 &= " " & 十位(位數(10)) & " " & 千位(1) ElseIf 位數(10) <> "0" And 位數(11) <> "0" Then : 答案 &= " " & 個位(位數(10) & 位數(11)) & " " & 千位(1) : End If Else If 位數(10) <> "0" And 位數(11) = "0" Then : 答案 &= " " & 十位(位數(10)) & " " & 千位(1) ElseIf 位數(10) <> "0" And 位數(11) <> "0" Then : 答案 &= " " & 十位(位數(10)) & " " & 個位(位數(11)) & " " & 千位(1) : End If End If '------------------百------------------------------------------------------------------------------------------------------ If CInt(位數(12) & 位數(13) & 末位數) < 100 Then ElseIf CInt(位數(12) & 位數(13) & 末位數) < 200 Then : 答案 &= " " & 百位(0) ElseIf CInt(位數(12) & 位數(13) & 末位數) >= 200 Then : 答案 &= " " & 個位(位數(12)) & " " & 百位(1) : End If '------------------個十------------------------------------------------------------------------------------------------------ If 位數(13) = "0" And 末位數 = "0" Then ElseIf 位數(13) = "0" And 末位數 <> "0" Then : 答案 &= " " & 個位(末位數) Else If CInt(位數(13) & 末位數) < 21 Then If 末位數 = "0" Then : 答案 &= " " & 十位(位數(13)) : Else : 答案 &= " " & 個位(位數(13) & 末位數) : End If Else If 位數(13) <> "0" And 末位數 = "0" Then : 答案 &= " " & 十位(位數(13)) ElseIf 位數(13) <> "0" And 末位數 <> "0" Then : 答案 &= " " & 十位(位數(13)) & " " & 個位(末位數) End If End If End If End If Else If 數長 = 1 Then : 答案 = 個位(申請金額_nud.Value) ElseIf 數長 = 2 Then If 末位數 = "0" Then : 答案 = 個位(位數(1)) & 拾 : Else : 答案 = 個位(位數(1)) & 拾 & 個位(末位數) : End If ElseIf 數長 = 3 Then : 答案 = 個位(位數(1)) & 百 If 位數(2) = "0" And 末位數 = "0" Then ElseIf 位數(2) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(末位數) ElseIf 位數(2) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(2)) & 拾 ElseIf 位數(2) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(2)) & 拾 & 個位(末位數) End If ElseIf 數長 = 4 Then : 答案 = 個位(位數(1)) & 仟 If 位數(2) = "0" And 位數(3) = "0" And 末位數 = "0" Then ElseIf 位數(2) = "0" And 位數(3) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(末位數) ElseIf 位數(2) = "0" And 位數(3) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(3)) & 拾 & 個位(末位數) ElseIf 位數(2) = "0" And 位數(3) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(3)) & 拾 ElseIf 位數(2) <> "0" And 位數(3) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(2)) & 百 ElseIf 位數(2) <> "0" And 位數(3) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(2)) & 百 & 零 & 個位(末位數) ElseIf 位數(2) <> "0" And 位數(3) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(2)) & 百 & 個位(位數(3)) & 拾 ElseIf 位數(2) <> "0" And 末位數 <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(2)) & 百 & 個位(位數(3)) & 拾 & 個位(末位數) End If ElseIf 數長 = 5 Then : 答案 = 個位(位數(1)) & 萬 If 位數(2) = "0" And 位數(3) = "0" And 位數(4) = "0" And 末位數 = "0" Then ElseIf 位數(2) = "0" And 位數(3) = "0" And 位數(4) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(末位數) ElseIf 位數(2) = "0" And 位數(3) = "0" And 位數(4) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(4)) & 拾 ElseIf 位數(2) = "0" And 位數(3) = "0" And 位數(4) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(4)) & 拾 & 個位(末位數) ElseIf 位數(2) = "0" And 位數(3) <> "0" And 位數(4) = "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(3)) & 百 ElseIf 位數(2) = "0" And 位數(3) <> "0" And 位數(4) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(3)) & 百 & 零 & 個位(末位數) ElseIf 位數(2) = "0" And 位數(3) <> "0" And 位數(4) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(3)) & 百 & 個位(位數(4)) & 拾 ElseIf 位數(2) = "0" And 位數(3) <> "0" And 位數(4) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(3)) & 百 & 個位(位數(4)) & 拾 & 個位(末位數) ElseIf 位數(2) <> "0" And 位數(3) = "0" And 位數(4) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(2)) & 仟 ElseIf 位數(2) <> "0" And 位數(3) = "0" And 位數(4) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(2)) & 仟 & 零 & 個位(末位數) ElseIf 位數(2) <> "0" And 位數(3) = "0" And 位數(4) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(2)) & 仟 & 零 & 個位(位數(4)) & 拾 ElseIf 位數(2) <> "0" And 位數(3) = "0" And 位數(4) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(2)) & 仟 & 零 & 個位(位數(4)) & 拾 & 個位(末位數) ElseIf 位數(2) <> "0" And 位數(3) <> "0" And 位數(4) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(2)) & 仟 & 個位(位數(3)) & 百 ElseIf 位數(2) <> "0" And 位數(3) <> "0" And 位數(4) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(2)) & 仟 & 個位(位數(3)) & 百 & 零 & 個位(末位數) ElseIf 位數(2) <> "0" And 位數(3) <> "0" And 位數(4) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(2)) & 仟 & 個位(位數(3)) & 百 & 個位(位數(4)) & 拾 ElseIf 位數(2) <> "0" And 位數(3) <> "0" And 位數(4) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(2)) & 仟 & 個位(位數(3)) & 百 & 個位(位數(4)) & 拾 & 個位(末位數) End If ElseIf 數長 = 6 Then If 位數(2) = "0" Then : 答案 = 個位(位數(1)) & 拾 & 萬 : Else : 答案 = 個位(位數(1)) & 拾 & 個位(位數(2)) & 萬 : End If If 位數(3) = "0" And 位數(4) = "0" And 位數(5) = "0" And 末位數 = "0" Then ElseIf 位數(3) = "0" And 位數(4) = "0" And 位數(5) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(末位數) ElseIf 位數(3) = "0" And 位數(4) = "0" And 位數(5) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(5)) & 拾 ElseIf 位數(3) = "0" And 位數(4) = "0" And 位數(5) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(5)) & 拾 & 個位(末位數) ElseIf 位數(3) = "0" And 位數(4) <> "0" And 位數(5) = "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(4)) & 百 ElseIf 位數(3) = "0" And 位數(4) <> "0" And 位數(5) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(4)) & 百 & 零 & 個位(末位數) ElseIf 位數(3) = "0" And 位數(4) <> "0" And 位數(5) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(4)) & 百 & 個位(位數(5)) & 拾 ElseIf 位數(3) = "0" And 位數(4) <> "0" And 位數(5) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(4)) & 百 & 個位(位數(5)) & 拾 & 個位(末位數) ElseIf 位數(3) <> "0" And 位數(4) = "0" And 位數(5) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(3)) & 仟 ElseIf 位數(3) <> "0" And 位數(4) = "0" And 位數(5) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(3)) & 仟 & 零 & 個位(末位數) ElseIf 位數(3) <> "0" And 位數(4) = "0" And 位數(5) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(3)) & 仟 & 零 & 個位(位數(5)) & 拾 ElseIf 位數(3) <> "0" And 位數(4) = "0" And 位數(5) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(3)) & 仟 & 零 & 個位(位數(5)) & 拾 & 個位(末位數) ElseIf 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(3)) & 仟 & 個位(位數(4)) & 百 ElseIf 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(3)) & 仟 & 個位(位數(4)) & 百 & 零 & 個位(末位數) ElseIf 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(3)) & 仟 & 個位(位數(4)) & 百 & 個位(位數(5)) & 拾 ElseIf 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(3)) & 仟 & 個位(位數(4)) & 百 & 個位(位數(5)) & 拾 & 個位(末位數) End If ElseIf 數長 = 7 Then : 答案 = 個位(位數(1)) & 百 If 位數(2) = "0" And 位數(3) = "0" Then : 答案 &= 萬 ElseIf 位數(2) = "0" And 位數(3) <> "0" Then : 答案 &= 零 & 個位(位數(3)) & 萬 ElseIf 位數(2) <> "0" And 位數(3) = "0" Then : 答案 &= 個位(位數(2)) & 拾 & 萬 ElseIf 位數(2) <> "0" And 位數(3) <> "0" Then : 答案 &= 個位(位數(2)) & 拾 & 個位(位數(3)) & 萬 End If If 位數(4) = "0" And 位數(5) = "0" And 位數(6) = "0" And 末位數 = "0" Then ElseIf 位數(4) = "0" And 位數(5) = "0" And 位數(6) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(末位數) ElseIf 位數(4) = "0" And 位數(5) = "0" And 位數(6) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(6)) & 拾 ElseIf 位數(4) = "0" And 位數(5) = "0" And 位數(6) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(6)) & 拾 & 個位(末位數) ElseIf 位數(4) = "0" And 位數(5) <> "0" And 位數(6) = "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(5)) & 百 ElseIf 位數(4) = "0" And 位數(5) <> "0" And 位數(6) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(5)) & 百 & 零 & 個位(末位數) ElseIf 位數(4) = "0" And 位數(5) <> "0" And 位數(6) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(5)) & 百 & 個位(位數(6)) & 拾 ElseIf 位數(4) = "0" And 位數(5) <> "0" And 位數(6) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(5)) & 百 & 個位(位數(6)) & 拾 & 個位(末位數) ElseIf 位數(4) <> "0" And 位數(5) = "0" And 位數(6) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(4)) & 仟 ElseIf 位數(4) <> "0" And 位數(5) = "0" And 位數(6) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(4)) & 仟 & 零 & 個位(末位數) ElseIf 位數(4) <> "0" And 位數(5) = "0" And 位數(6) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(4)) & 仟 & 零 & 個位(位數(6)) & 拾 ElseIf 位數(4) <> "0" And 位數(5) = "0" And 位數(6) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(4)) & 仟 & 零 & 個位(位數(6)) & 拾 & 個位(末位數) ElseIf 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(4)) & 仟 & 個位(位數(5)) & 百 ElseIf 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(4)) & 仟 & 個位(位數(5)) & 百 & 零 & 個位(末位數) ElseIf 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(4)) & 仟 & 個位(位數(5)) & 百 & 個位(位數(6)) & 拾 ElseIf 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(4)) & 仟 & 個位(位數(5)) & 百 & 個位(位數(6)) & 拾 & 個位(末位數) End If ElseIf 數長 = 8 Then : 答案 = 個位(位數(1)) & 仟 If 位數(2) = "0" And 位數(3) = "0" And 位數(4) = "0" Then : 答案 &= 萬 ElseIf 位數(2) = "0" And 位數(3) = "0" And 位數(4) <> "0" Then : 答案 &= 零 & 個位(位數(4)) & 萬 ElseIf 位數(2) = "0" And 位數(3) <> "0" And 位數(4) <> "0" Then : 答案 &= 零 & 個位(位數(3)) & 拾 & 個位(位數(4)) & 萬 ElseIf 位數(2) = "0" And 位數(3) <> "0" And 位數(4) = "0" Then : 答案 &= 零 & 個位(位數(3)) & 拾 & 萬 ElseIf 位數(2) <> "0" And 位數(3) = "0" And 位數(4) = "0" Then : 答案 &= 個位(位數(2)) & 百 & 萬 ElseIf 位數(2) <> "0" And 位數(3) = "0" And 位數(4) <> "0" Then : 答案 &= 個位(位數(2)) & 百 & 零 & 個位(位數(4)) & 萬 ElseIf 位數(2) <> "0" And 位數(3) <> "0" And 位數(4) = "0" Then : 答案 &= 個位(位數(2)) & 百 & 個位(位數(3)) & 拾 & 萬 ElseIf 位數(2) <> "0" And 位數(4) <> "0" And 位數(4) <> "0" Then : 答案 &= 個位(位數(2)) & 百 & 個位(位數(3)) & 拾 & 個位(位數(4)) & 萬 End If If 位數(5) = "0" And 位數(6) = "0" And 位數(7) = "0" And 末位數 = "0" Then ElseIf 位數(5) = "0" And 位數(6) = "0" And 位數(7) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(末位數) ElseIf 位數(5) = "0" And 位數(6) = "0" And 位數(7) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(7)) & 拾 ElseIf 位數(5) = "0" And 位數(6) = "0" And 位數(7) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(7)) & 拾 & 個位(末位數) ElseIf 位數(5) = "0" And 位數(6) <> "0" And 位數(7) = "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(6)) & 百 ElseIf 位數(5) = "0" And 位數(6) <> "0" And 位數(7) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(6)) & 百 & 零 & 個位(末位數) ElseIf 位數(5) = "0" And 位數(6) <> "0" And 位數(7) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(6)) & 百 & 個位(位數(7)) & 拾 ElseIf 位數(5) = "0" And 位數(6) <> "0" And 位數(7) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(6)) & 百 & 個位(位數(7)) & 拾 & 個位(末位數) ElseIf 位數(5) <> "0" And 位數(6) = "0" And 位數(7) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(5)) & 仟 ElseIf 位數(5) <> "0" And 位數(6) = "0" And 位數(7) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(5)) & 仟 & 零 & 個位(末位數) ElseIf 位數(5) <> "0" And 位數(6) = "0" And 位數(7) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(5)) & 仟 & 零 & 個位(位數(7)) & 拾 ElseIf 位數(5) <> "0" And 位數(6) = "0" And 位數(7) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(5)) & 仟 & 零 & 個位(位數(7)) & 拾 & 個位(末位數) ElseIf 位數(5) <> "0" And 位數(6) <> "0" And 位數(7) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(5)) & 仟 & 個位(位數(6)) & 百 ElseIf 位數(5) <> "0" And 位數(6) <> "0" And 位數(7) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(5)) & 仟 & 個位(位數(6)) & 百 & 零 & 個位(末位數) ElseIf 位數(5) <> "0" And 位數(6) <> "0" And 位數(7) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(5)) & 仟 & 個位(位數(6)) & 百 & 個位(位數(7)) & 拾 ElseIf 位數(5) <> "0" And 位數(6) <> "0" And 位數(7) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(5)) & 仟 & 個位(位數(6)) & 百 & 個位(位數(7)) & 拾 & 個位(末位數) End If ElseIf 數長 = 9 Then : 答案 = 個位(位數(1)) & 億 If 位數(2) = "0" And 位數(3) = "0" And 位數(4) = "0" And 位數(5) = "0" Then ElseIf 位數(2) = "0" And 位數(3) = "0" And 位數(4) = "0" And 位數(5) <> "0" Then : 答案 &= 零 & 個位(位數(5)) & 萬 ElseIf 位數(2) = "0" And 位數(3) = "0" And 位數(4) <> "0" And 位數(5) = "0" Then : 答案 &= 零 & 個位(位數(4)) & 拾 & 萬 ElseIf 位數(2) = "0" And 位數(3) = "0" And 位數(4) <> "0" And 位數(5) <> "0" Then : 答案 &= 零 & 個位(位數(4)) & 拾 & 個位(位數(5)) & 萬 ElseIf 位數(2) = "0" And 位數(3) <> "0" And 位數(4) = "0" And 位數(5) = "0" Then : 答案 &= 零 & 個位(位數(3)) & 百 & 萬 ElseIf 位數(2) = "0" And 位數(3) <> "0" And 位數(4) = "0" And 位數(5) <> "0" Then : 答案 &= 零 & 個位(位數(3)) & 百 & 零 & 個位(位數(5)) & 萬 ElseIf 位數(2) = "0" And 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) = "0" Then : 答案 &= 零 & 個位(位數(3)) & 百 & 個位(位數(4)) & 拾 & 萬 ElseIf 位數(2) = "0" And 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) <> "0" Then : 答案 &= 零 & 個位(位數(3)) & 百 & 個位(位數(4)) & 拾 & 個位(位數(5)) & 萬 ElseIf 位數(2) <> "0" And 位數(3) = "0" And 位數(4) = "0" And 位數(5) = "0" Then : 答案 &= 個位(位數(2)) & 仟 & 萬 ElseIf 位數(2) <> "0" And 位數(3) = "0" And 位數(4) = "0" And 位數(5) <> "0" Then : 答案 &= 個位(位數(2)) & 仟 & 零 & 個位(位數(5)) & 萬 ElseIf 位數(2) <> "0" And 位數(3) = "0" And 位數(4) <> "0" And 位數(5) = "0" Then : 答案 &= 個位(位數(2)) & 仟 & 零 & 個位(位數(4)) & 拾 & 萬 ElseIf 位數(2) <> "0" And 位數(3) = "0" And 位數(4) <> "0" And 位數(5) <> "0" Then : 答案 &= 個位(位數(2)) & 仟 & 零 & 個位(位數(4)) & 拾 & 個位(位數(5)) & 萬 ElseIf 位數(2) <> "0" And 位數(3) <> "0" And 位數(4) = "0" And 位數(5) = "0" Then : 答案 &= 個位(位數(2)) & 仟 & 個位(位數(3)) & 百 & 萬 ElseIf 位數(2) <> "0" And 位數(3) <> "0" And 位數(4) = "0" And 位數(5) <> "0" Then : 答案 &= 個位(位數(2)) & 仟 & 個位(位數(3)) & 百 & 零 & 個位(位數(5)) & 萬 ElseIf 位數(2) <> "0" And 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) = "0" Then : 答案 &= 個位(位數(2)) & 仟 & 個位(位數(3)) & 百 & 個位(位數(4)) & 拾 & 萬 ElseIf 位數(2) <> "0" And 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) <> "0" Then : 答案 &= 個位(位數(2)) & 仟 & 個位(位數(3)) & 百 & 個位(位數(4)) & 拾 & 個位(位數(5)) & 萬 End If If 位數(6) = "0" And 位數(7) = "0" And 位數(8) = "0" And 末位數 = "0" Then ElseIf 位數(6) = "0" And 位數(7) = "0" And 位數(8) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(末位數) ElseIf 位數(6) = "0" And 位數(7) = "0" And 位數(8) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(8)) & 拾 ElseIf 位數(6) = "0" And 位數(7) = "0" And 位數(8) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(8)) & 拾 & 個位(末位數) ElseIf 位數(6) = "0" And 位數(7) <> "0" And 位數(8) = "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(7)) & 百 ElseIf 位數(6) = "0" And 位數(7) <> "0" And 位數(8) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(7)) & 百 & 零 & 個位(末位數) ElseIf 位數(6) = "0" And 位數(7) <> "0" And 位數(8) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(7)) & 百 & 個位(位數(8)) & 拾 ElseIf 位數(6) = "0" And 位數(7) <> "0" And 位數(8) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(7)) & 百 & 個位(位數(8)) & 拾 & 個位(末位數) ElseIf 位數(6) <> "0" And 位數(7) = "0" And 位數(8) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(6)) & 仟 ElseIf 位數(6) <> "0" And 位數(7) = "0" And 位數(8) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(6)) & 仟 & 零 & 個位(末位數) ElseIf 位數(6) <> "0" And 位數(7) = "0" And 位數(8) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(6)) & 仟 & 零 & 個位(位數(8)) & 拾 ElseIf 位數(6) <> "0" And 位數(7) = "0" And 位數(8) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(6)) & 仟 & 零 & 個位(位數(8)) & 拾 & 個位(末位數) ElseIf 位數(6) <> "0" And 位數(7) <> "0" And 位數(8) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(6)) & 仟 & 個位(位數(7)) & 百 ElseIf 位數(6) <> "0" And 位數(7) <> "0" And 位數(8) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(6)) & 仟 & 個位(位數(7)) & 百 & 零 & 個位(末位數) ElseIf 位數(6) <> "0" And 位數(7) <> "0" And 位數(8) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(6)) & 仟 & 個位(位數(7)) & 百 & 個位(位數(8)) & 拾 ElseIf 位數(6) <> "0" And 位數(7) <> "0" And 位數(8) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(6)) & 仟 & 個位(位數(7)) & 百 & 個位(位數(8)) & 拾 & 個位(末位數) End If ElseIf 數長 = 10 Then If 位數(2) = "0" Then : 答案 = 個位(位數(1)) & 拾 & 億 : Else : 答案 = 個位(位數(1)) & 拾 & 個位(位數(2)) & 億 : End If If 位數(3) = "0" And 位數(4) = "0" And 位數(5) = "0" And 位數(6) = "0" Then ElseIf 位數(3) = "0" And 位數(4) = "0" And 位數(5) = "0" And 位數(6) <> "0" Then : 答案 &= 零 & 個位(位數(6)) & 萬 ElseIf 位數(3) = "0" And 位數(4) = "0" And 位數(5) <> "0" And 位數(6) = "0" Then : 答案 &= 零 & 個位(位數(5)) & 拾 & 萬 ElseIf 位數(3) = "0" And 位數(4) = "0" And 位數(5) <> "0" And 位數(6) <> "0" Then : 答案 &= 零 & 個位(位數(5)) & 拾 & 個位(位數(6)) & 萬 ElseIf 位數(3) = "0" And 位數(4) <> "0" And 位數(5) = "0" And 位數(6) = "0" Then : 答案 &= 零 & 個位(位數(4)) & 百 & 萬 ElseIf 位數(3) = "0" And 位數(4) <> "0" And 位數(5) = "0" And 位數(6) <> "0" Then : 答案 &= 零 & 個位(位數(4)) & 百 & 零 & 個位(位數(6)) & 萬 ElseIf 位數(3) = "0" And 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) = "0" Then : 答案 &= 零 & 個位(位數(4)) & 百 & 個位(位數(5)) & 拾 & 萬 ElseIf 位數(3) = "0" And 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) <> "0" Then : 答案 &= 零 & 個位(位數(4)) & 百 & 個位(位數(5)) & 拾 & 個位(位數(6)) & 萬 ElseIf 位數(3) <> "0" And 位數(4) = "0" And 位數(5) = "0" And 位數(6) = "0" Then : 答案 &= 個位(位數(3)) & 仟 & 萬 ElseIf 位數(3) <> "0" And 位數(4) = "0" And 位數(5) = "0" And 位數(6) <> "0" Then : 答案 &= 個位(位數(3)) & 仟 & 零 & 個位(位數(6)) & 萬 ElseIf 位數(3) <> "0" And 位數(4) = "0" And 位數(5) <> "0" And 位數(6) = "0" Then : 答案 &= 個位(位數(3)) & 仟 & 零 & 個位(位數(5)) & 拾 & 萬 ElseIf 位數(3) <> "0" And 位數(4) = "0" And 位數(5) <> "0" And 位數(6) <> "0" Then : 答案 &= 個位(位數(3)) & 仟 & 零 & 個位(位數(5)) & 拾 & 個位(位數(6)) & 萬 ElseIf 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) = "0" And 位數(6) = "0" Then : 答案 &= 個位(位數(3)) & 仟 & 個位(位數(4)) & 百 & 萬 ElseIf 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) = "0" And 位數(6) <> "0" Then : 答案 &= 個位(位數(3)) & 仟 & 個位(位數(4)) & 百 & 零 & 個位(位數(6)) & 萬 ElseIf 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) = "0" Then : 答案 &= 個位(位數(3)) & 仟 & 個位(位數(4)) & 百 & 個位(位數(5)) & 拾 & 萬 ElseIf 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) <> "0" Then : 答案 &= 個位(位數(3)) & 仟 & 個位(位數(4)) & 百 & 個位(位數(5)) & 拾 & 個位(位數(6)) & 萬 End If If 位數(7) = "0" And 位數(8) = "0" And 位數(9) = "0" And 末位數 = "0" Then ElseIf 位數(7) = "0" And 位數(8) = "0" And 位數(9) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(末位數) ElseIf 位數(7) = "0" And 位數(8) = "0" And 位數(9) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(9)) & 拾 ElseIf 位數(7) = "0" And 位數(8) = "0" And 位數(9) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(9)) & 拾 & 個位(末位數) ElseIf 位數(7) = "0" And 位數(8) <> "0" And 位數(9) = "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(8)) & 百 ElseIf 位數(7) = "0" And 位數(8) <> "0" And 位數(9) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(8)) & 百 & 零 & 個位(末位數) ElseIf 位數(7) = "0" And 位數(8) <> "0" And 位數(9) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(8)) & 百 & 個位(位數(9)) & 拾 ElseIf 位數(7) = "0" And 位數(8) <> "0" And 位數(9) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(8)) & 百 & 個位(位數(9)) & 拾 & 個位(末位數) ElseIf 位數(7) <> "0" And 位數(8) = "0" And 位數(9) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(7)) & 仟 ElseIf 位數(7) <> "0" And 位數(8) = "0" And 位數(9) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(7)) & 仟 & 零 & 個位(末位數) ElseIf 位數(7) <> "0" And 位數(8) = "0" And 位數(9) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(7)) & 仟 & 零 & 個位(位數(9)) & 拾 ElseIf 位數(7) <> "0" And 位數(8) = "0" And 位數(9) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(7)) & 仟 & 零 & 個位(位數(9)) & 拾 & 個位(末位數) ElseIf 位數(7) <> "0" And 位數(8) <> "0" And 位數(9) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(7)) & 仟 & 個位(位數(8)) & 百 ElseIf 位數(7) <> "0" And 位數(8) <> "0" And 位數(9) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(7)) & 仟 & 個位(位數(8)) & 百 & 零 & 個位(末位數) ElseIf 位數(7) <> "0" And 位數(8) <> "0" And 位數(9) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(7)) & 仟 & 個位(位數(8)) & 百 & 個位(位數(9)) & 拾 ElseIf 位數(7) <> "0" And 位數(8) <> "0" And 位數(9) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(7)) & 仟 & 個位(位數(8)) & 百 & 個位(位數(9)) & 拾 & 個位(末位數) End If ElseIf 數長 = 11 Then : 答案 = 個位(位數(1)) & 百 If 位數(2) = "0" And 位數(3) = "0" Then : 答案 &= 億 ElseIf 位數(2) = "0" And 位數(3) <> "0" Then : 答案 &= 零 & 個位(位數(3)) & 億 ElseIf 位數(2) <> "0" And 位數(3) = "0" Then : 答案 &= 個位(位數(2)) & 拾 & 億 ElseIf 位數(2) <> "0" And 位數(3) <> "0" Then : 答案 &= 個位(位數(2)) & 拾 & 個位(位數(3)) & 億 End If If 位數(4) = "0" And 位數(5) = "0" And 位數(6) = "0" And 位數(7) = "0" Then ElseIf 位數(4) = "0" And 位數(5) = "0" And 位數(6) = "0" And 位數(7) <> "0" Then : 答案 &= 零 & 個位(位數(7)) & 萬 ElseIf 位數(4) = "0" And 位數(5) = "0" And 位數(6) <> "0" And 位數(7) = "0" Then : 答案 &= 零 & 個位(位數(6)) & 拾 & 萬 ElseIf 位數(4) = "0" And 位數(5) = "0" And 位數(6) <> "0" And 位數(7) <> "0" Then : 答案 &= 零 & 個位(位數(6)) & 拾 & 個位(位數(7)) & 萬 ElseIf 位數(4) = "0" And 位數(5) <> "0" And 位數(6) = "0" And 位數(7) = "0" Then : 答案 &= 零 & 個位(位數(5)) & 百 & 萬 ElseIf 位數(4) = "0" And 位數(5) <> "0" And 位數(6) = "0" And 位數(7) <> "0" Then : 答案 &= 零 & 個位(位數(5)) & 百 & 零 & 個位(位數(7)) & 萬 ElseIf 位數(4) = "0" And 位數(5) <> "0" And 位數(6) <> "0" And 位數(7) = "0" Then : 答案 &= 零 & 個位(位數(5)) & 百 & 個位(位數(6)) & 拾 & 萬 ElseIf 位數(4) = "0" And 位數(5) <> "0" And 位數(6) <> "0" And 位數(7) <> "0" Then : 答案 &= 零 & 個位(位數(5)) & 百 & 個位(位數(6)) & 拾 & 個位(位數(7)) & 萬 ElseIf 位數(4) <> "0" And 位數(5) = "0" And 位數(6) = "0" And 位數(7) = "0" Then : 答案 &= 個位(位數(4)) & 仟 & 萬 ElseIf 位數(4) <> "0" And 位數(5) = "0" And 位數(6) = "0" And 位數(7) <> "0" Then : 答案 &= 個位(位數(4)) & 仟 & 零 & 個位(位數(7)) & 萬 ElseIf 位數(4) <> "0" And 位數(5) = "0" And 位數(6) <> "0" And 位數(7) = "0" Then : 答案 &= 個位(位數(4)) & 仟 & 零 & 個位(位數(6)) & 拾 & 萬 ElseIf 位數(4) <> "0" And 位數(5) = "0" And 位數(6) <> "0" And 位數(7) <> "0" Then : 答案 &= 個位(位數(4)) & 仟 & 零 & 個位(位數(6)) & 拾 & 個位(位數(7)) & 萬 ElseIf 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) = "0" And 位數(7) = "0" Then : 答案 &= 個位(位數(4)) & 仟 & 個位(位數(5)) & 百 & 萬 ElseIf 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) = "0" And 位數(7) <> "0" Then : 答案 &= 個位(位數(4)) & 仟 & 個位(位數(5)) & 百 & 零 & 個位(位數(7)) & 萬 ElseIf 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) <> "0" And 位數(7) = "0" Then : 答案 &= 個位(位數(4)) & 仟 & 個位(位數(5)) & 百 & 個位(位數(6)) & 拾 & 萬 ElseIf 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) <> "0" And 位數(7) <> "0" Then : 答案 &= 個位(位數(4)) & 仟 & 個位(位數(5)) & 百 & 個位(位數(6)) & 拾 & 個位(位數(7)) & 萬 End If If 位數(8) = "0" And 位數(9) = "0" And 位數(10) = "0" And 末位數 = "0" Then ElseIf 位數(8) = "0" And 位數(9) = "0" And 位數(10) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(末位數) ElseIf 位數(8) = "0" And 位數(9) = "0" And 位數(10) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(10)) & 拾 ElseIf 位數(8) = "0" And 位數(9) = "0" And 位數(10) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(10)) & 拾 & 個位(末位數) ElseIf 位數(8) = "0" And 位數(9) <> "0" And 位數(10) = "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(9)) & 百 ElseIf 位數(8) = "0" And 位數(9) <> "0" And 位數(10) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(9)) & 百 & 零 & 個位(末位數) ElseIf 位數(8) = "0" And 位數(9) <> "0" And 位數(10) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(9)) & 百 & 個位(位數(10)) & 拾 ElseIf 位數(8) = "0" And 位數(9) <> "0" And 位數(10) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(9)) & 百 & 個位(位數(10)) & 拾 & 個位(末位數) ElseIf 位數(8) <> "0" And 位數(9) = "0" And 位數(10) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(8)) & 仟 ElseIf 位數(8) <> "0" And 位數(9) = "0" And 位數(10) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(8)) & 仟 & 零 & 個位(末位數) ElseIf 位數(8) <> "0" And 位數(9) = "0" And 位數(10) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(8)) & 仟 & 零 & 個位(位數(10)) & 拾 ElseIf 位數(8) <> "0" And 位數(9) = "0" And 位數(10) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(8)) & 仟 & 零 & 個位(位數(10)) & 拾 & 個位(末位數) ElseIf 位數(8) <> "0" And 位數(9) <> "0" And 位數(10) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(8)) & 仟 & 個位(位數(9)) & 百 ElseIf 位數(8) <> "0" And 位數(9) <> "0" And 位數(10) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(8)) & 仟 & 個位(位數(9)) & 百 & 零 & 個位(末位數) ElseIf 位數(8) <> "0" And 位數(9) <> "0" And 位數(10) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(8)) & 仟 & 個位(位數(9)) & 百 & 個位(位數(10)) & 拾 ElseIf 位數(8) <> "0" And 位數(9) <> "0" And 位數(10) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(8)) & 仟 & 個位(位數(9)) & 百 & 個位(位數(10)) & 拾 & 個位(末位數) End If ElseIf 數長 = 12 Then : 答案 = 個位(位數(1)) & 仟 If 位數(2) = "0" And 位數(3) = "0" And 位數(4) = "0" Then : 答案 &= 億 ElseIf 位數(2) = "0" And 位數(3) = "0" And 位數(4) <> "0" Then : 答案 &= 零 & 個位(位數(4)) & 億 ElseIf 位數(2) = "0" And 位數(3) <> "0" And 位數(4) <> "0" Then : 答案 &= 零 & 個位(位數(3)) & 拾 & 個位(位數(4)) & 億 ElseIf 位數(2) = "0" And 位數(3) <> "0" And 位數(4) = "0" Then : 答案 &= 零 & 個位(位數(3)) & 拾 & 億 ElseIf 位數(2) <> "0" And 位數(3) = "0" And 位數(4) = "0" Then : 答案 &= 個位(位數(2)) & 百 & 億 ElseIf 位數(2) <> "0" And 位數(3) = "0" And 位數(4) <> "0" Then : 答案 &= 個位(位數(2)) & 百 & 零 & 個位(位數(4)) & 億 ElseIf 位數(2) <> "0" And 位數(3) <> "0" And 位數(4) = "0" Then : 答案 &= 個位(位數(2)) & 百 & 個位(位數(3)) & 拾 & 億 ElseIf 位數(2) <> "0" And 位數(4) <> "0" And 位數(4) <> "0" Then : 答案 &= 個位(位數(2)) & 百 & 個位(位數(3)) & 拾 & 個位(位數(4)) & 億 End If If 位數(5) = "0" And 位數(6) = "0" And 位數(7) = "0" And 位數(8) = "0" Then ElseIf 位數(5) = "0" And 位數(6) = "0" And 位數(7) = "0" And 位數(8) <> "0" Then : 答案 &= 零 & 個位(位數(8)) & 萬 ElseIf 位數(5) = "0" And 位數(6) = "0" And 位數(7) <> "0" And 位數(8) = "0" Then : 答案 &= 零 & 個位(位數(7)) & 拾 & 萬 ElseIf 位數(5) = "0" And 位數(6) = "0" And 位數(7) <> "0" And 位數(8) <> "0" Then : 答案 &= 零 & 個位(位數(7)) & 拾 & 個位(位數(8)) & 萬 ElseIf 位數(5) = "0" And 位數(6) <> "0" And 位數(7) = "0" And 位數(8) = "0" Then : 答案 &= 零 & 個位(位數(6)) & 百 & 萬 ElseIf 位數(5) = "0" And 位數(6) <> "0" And 位數(7) = "0" And 位數(8) <> "0" Then : 答案 &= 零 & 個位(位數(6)) & 百 & 零 & 個位(位數(8)) & 萬 ElseIf 位數(5) = "0" And 位數(6) <> "0" And 位數(7) <> "0" And 位數(8) = "0" Then : 答案 &= 零 & 個位(位數(6)) & 百 & 個位(位數(7)) & 拾 & 萬 ElseIf 位數(5) = "0" And 位數(6) <> "0" And 位數(7) <> "0" And 位數(8) <> "0" Then : 答案 &= 零 & 個位(位數(6)) & 百 & 個位(位數(7)) & 拾 & 個位(位數(8)) & 萬 ElseIf 位數(5) <> "0" And 位數(6) = "0" And 位數(7) = "0" And 位數(8) = "0" Then : 答案 &= 個位(位數(5)) & 仟 & 萬 ElseIf 位數(5) <> "0" And 位數(6) = "0" And 位數(7) = "0" And 位數(8) <> "0" Then : 答案 &= 個位(位數(5)) & 仟 & 零 & 個位(位數(8)) & 萬 ElseIf 位數(5) <> "0" And 位數(6) = "0" And 位數(7) <> "0" And 位數(8) = "0" Then : 答案 &= 個位(位數(5)) & 仟 & 零 & 個位(位數(7)) & 拾 & 萬 ElseIf 位數(5) <> "0" And 位數(6) = "0" And 位數(7) <> "0" And 位數(8) <> "0" Then : 答案 &= 個位(位數(5)) & 仟 & 零 & 個位(位數(7)) & 拾 & 個位(位數(8)) & 萬 ElseIf 位數(5) <> "0" And 位數(6) <> "0" And 位數(7) = "0" And 位數(8) = "0" Then : 答案 &= 個位(位數(5)) & 仟 & 個位(位數(6)) & 百 & 萬 ElseIf 位數(5) <> "0" And 位數(6) <> "0" And 位數(7) = "0" And 位數(8) <> "0" Then : 答案 &= 個位(位數(5)) & 仟 & 個位(位數(6)) & 百 & 零 & 個位(位數(8)) & 萬 ElseIf 位數(5) <> "0" And 位數(6) <> "0" And 位數(7) <> "0" And 位數(8) = "0" Then : 答案 &= 個位(位數(5)) & 仟 & 個位(位數(6)) & 百 & 個位(位數(7)) & 拾 & 萬 ElseIf 位數(5) <> "0" And 位數(6) <> "0" And 位數(7) <> "0" And 位數(8) <> "0" Then : 答案 &= 個位(位數(5)) & 仟 & 個位(位數(6)) & 百 & 個位(位數(7)) & 拾 & 個位(位數(8)) & 萬 End If If 位數(9) = "0" And 位數(10) = "0" And 位數(11) = "0" And 末位數 = "0" Then ElseIf 位數(9) = "0" And 位數(10) = "0" And 位數(11) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(末位數) ElseIf 位數(9) = "0" And 位數(10) = "0" And 位數(11) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(11)) & 拾 ElseIf 位數(9) = "0" And 位數(10) = "0" And 位數(11) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(11)) & 拾 & 個位(末位數) ElseIf 位數(9) = "0" And 位數(10) <> "0" And 位數(11) = "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(10)) & 百 ElseIf 位數(9) = "0" And 位數(10) <> "0" And 位數(11) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(10)) & 百 & 零 & 個位(末位數) ElseIf 位數(9) = "0" And 位數(10) <> "0" And 位數(11) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(10)) & 百 & 個位(位數(11)) & 拾 ElseIf 位數(9) = "0" And 位數(10) <> "0" And 位數(11) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(10)) & 百 & 個位(位數(11)) & 拾 & 個位(末位數) ElseIf 位數(9) <> "0" And 位數(10) = "0" And 位數(11) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(9)) & 仟 ElseIf 位數(9) <> "0" And 位數(10) = "0" And 位數(11) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(9)) & 仟 & 零 & 個位(末位數) ElseIf 位數(9) <> "0" And 位數(10) = "0" And 位數(11) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(9)) & 仟 & 零 & 個位(位數(11)) & 拾 ElseIf 位數(9) <> "0" And 位數(10) = "0" And 位數(11) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(9)) & 仟 & 零 & 個位(位數(11)) & 拾 & 個位(末位數) ElseIf 位數(9) <> "0" And 位數(10) <> "0" And 位數(11) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(9)) & 仟 & 個位(位數(10)) & 百 ElseIf 位數(9) <> "0" And 位數(10) <> "0" And 位數(11) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(9)) & 仟 & 個位(位數(10)) & 百 & 零 & 個位(末位數) ElseIf 位數(9) <> "0" And 位數(10) <> "0" And 位數(11) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(9)) & 仟 & 個位(位數(10)) & 百 & 個位(位數(11)) & 拾 ElseIf 位數(9) <> "0" And 位數(10) <> "0" And 位數(11) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(9)) & 仟 & 個位(位數(10)) & 百 & 個位(位數(11)) & 拾 & 個位(末位數) End If ElseIf 數長 = 13 Then : 答案 = 個位(位數(1)) & 兆 : 答案 &= 個位(位數(2)) & 仟 If 位數(3) = "0" And 位數(4) = "0" And 位數(5) = "0" Then : 答案 &= 億 ElseIf 位數(3) = "0" And 位數(4) = "0" And 位數(5) <> "0" Then : 答案 &= 零 & 個位(位數(5)) & 億 ElseIf 位數(3) = "0" And 位數(4) <> "0" And 位數(5) <> "0" Then : 答案 &= 零 & 個位(位數(4)) & 拾 & 個位(位數(5)) & 億 ElseIf 位數(3) = "0" And 位數(4) <> "0" And 位數(5) = "0" Then : 答案 &= 零 & 個位(位數(4)) & 拾 & 億 ElseIf 位數(3) <> "0" And 位數(4) = "0" And 位數(5) = "0" Then : 答案 &= 個位(位數(3)) & 百 & 億 ElseIf 位數(3) <> "0" And 位數(4) = "0" And 位數(5) <> "0" Then : 答案 &= 個位(位數(3)) & 百 & 零 & 個位(位數(5)) & 億 ElseIf 位數(3) <> "0" And 位數(4) <> "0" And 位數(5) = "0" Then : 答案 &= 個位(位數(3)) & 百 & 個位(位數(4)) & 拾 & 億 ElseIf 位數(3) <> "0" And 位數(5) <> "0" And 位數(5) <> "0" Then : 答案 &= 個位(位數(3)) & 百 & 個位(位數(4)) & 拾 & 個位(位數(5)) & 億 End If If 位數(6) = "0" And 位數(7) = "0" And 位數(8) = "0" And 位數(9) = "0" Then ElseIf 位數(6) = "0" And 位數(7) = "0" And 位數(8) = "0" And 位數(9) <> "0" Then : 答案 &= 零 & 個位(位數(9)) & 萬 ElseIf 位數(6) = "0" And 位數(7) = "0" And 位數(8) <> "0" And 位數(9) = "0" Then : 答案 &= 零 & 個位(位數(8)) & 拾 & 萬 ElseIf 位數(6) = "0" And 位數(7) = "0" And 位數(8) <> "0" And 位數(9) <> "0" Then : 答案 &= 零 & 個位(位數(8)) & 拾 & 個位(位數(9)) & 萬 ElseIf 位數(6) = "0" And 位數(7) <> "0" And 位數(8) = "0" And 位數(9) = "0" Then : 答案 &= 零 & 個位(位數(7)) & 百 & 萬 ElseIf 位數(6) = "0" And 位數(7) <> "0" And 位數(8) = "0" And 位數(9) <> "0" Then : 答案 &= 零 & 個位(位數(7)) & 百 & 零 & 個位(位數(9)) & 萬 ElseIf 位數(6) = "0" And 位數(7) <> "0" And 位數(8) <> "0" And 位數(9) = "0" Then : 答案 &= 零 & 個位(位數(7)) & 百 & 個位(位數(8)) & 拾 & 萬 ElseIf 位數(6) = "0" And 位數(7) <> "0" And 位數(8) <> "0" And 位數(9) <> "0" Then : 答案 &= 零 & 個位(位數(7)) & 百 & 個位(位數(8)) & 拾 & 個位(位數(9)) & 萬 ElseIf 位數(6) <> "0" And 位數(7) = "0" And 位數(8) = "0" And 位數(9) = "0" Then : 答案 &= 個位(位數(6)) & 仟 & 萬 ElseIf 位數(6) <> "0" And 位數(7) = "0" And 位數(8) = "0" And 位數(9) <> "0" Then : 答案 &= 個位(位數(6)) & 仟 & 零 & 個位(位數(9)) & 萬 ElseIf 位數(6) <> "0" And 位數(7) = "0" And 位數(8) <> "0" And 位數(9) = "0" Then : 答案 &= 個位(位數(6)) & 仟 & 零 & 個位(位數(8)) & 拾 & 萬 ElseIf 位數(6) <> "0" And 位數(7) = "0" And 位數(8) <> "0" And 位數(9) <> "0" Then : 答案 &= 個位(位數(6)) & 仟 & 零 & 個位(位數(8)) & 拾 & 個位(位數(9)) & 萬 ElseIf 位數(6) <> "0" And 位數(7) <> "0" And 位數(8) = "0" And 位數(9) = "0" Then : 答案 &= 個位(位數(6)) & 仟 & 個位(位數(7)) & 百 & 萬 ElseIf 位數(6) <> "0" And 位數(7) <> "0" And 位數(8) = "0" And 位數(9) <> "0" Then : 答案 &= 個位(位數(6)) & 仟 & 個位(位數(7)) & 百 & 零 & 個位(位數(9)) & 萬 ElseIf 位數(6) <> "0" And 位數(7) <> "0" And 位數(8) <> "0" And 位數(9) = "0" Then : 答案 &= 個位(位數(6)) & 仟 & 個位(位數(7)) & 百 & 個位(位數(8)) & 拾 & 萬 ElseIf 位數(6) <> "0" And 位數(7) <> "0" And 位數(8) <> "0" And 位數(9) <> "0" Then : 答案 &= 個位(位數(6)) & 仟 & 個位(位數(7)) & 百 & 個位(位數(8)) & 拾 & 個位(位數(9)) & 萬 End If If 位數(10) = "0" And 位數(11) = "0" And 位數(12) = "0" And 末位數 = "0" Then ElseIf 位數(10) = "0" And 位數(11) = "0" And 位數(12) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(末位數) ElseIf 位數(10) = "0" And 位數(11) = "0" And 位數(12) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(12)) & 拾 ElseIf 位數(10) = "0" And 位數(11) = "0" And 位數(12) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(12)) & 拾 & 個位(末位數) ElseIf 位數(10) = "0" And 位數(11) <> "0" And 位數(12) = "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(11)) & 百 ElseIf 位數(10) = "0" And 位數(11) <> "0" And 位數(12) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(11)) & 百 & 零 & 個位(末位數) ElseIf 位數(10) = "0" And 位數(11) <> "0" And 位數(12) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(11)) & 百 & 個位(位數(12)) & 拾 ElseIf 位數(10) = "0" And 位數(11) <> "0" And 位數(12) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(11)) & 百 & 個位(位數(12)) & 拾 & 個位(末位數) ElseIf 位數(10) <> "0" And 位數(11) = "0" And 位數(12) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(10)) & 仟 ElseIf 位數(10) <> "0" And 位數(11) = "0" And 位數(12) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(10)) & 仟 & 零 & 個位(末位數) ElseIf 位數(10) <> "0" And 位數(11) = "0" And 位數(12) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(10)) & 仟 & 零 & 個位(位數(12)) & 拾 ElseIf 位數(10) <> "0" And 位數(11) = "0" And 位數(12) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(10)) & 仟 & 零 & 個位(位數(12)) & 拾 & 個位(末位數) ElseIf 位數(10) <> "0" And 位數(11) <> "0" And 位數(12) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(10)) & 仟 & 個位(位數(11)) & 百 ElseIf 位數(10) <> "0" And 位數(11) <> "0" And 位數(12) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(10)) & 仟 & 個位(位數(11)) & 百 & 零 & 個位(末位數) ElseIf 位數(10) <> "0" And 位數(11) <> "0" And 位數(12) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(10)) & 仟 & 個位(位數(11)) & 百 & 個位(位數(12)) & 拾 ElseIf 位數(10) <> "0" And 位數(11) <> "0" And 位數(12) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(10)) & 仟 & 個位(位數(11)) & 百 & 個位(位數(12)) & 拾 & 個位(末位數) End If ElseIf 數長 = 14 Then If 位數(2) = "0" Then : 答案 = 個位(位數(1)) & 拾 & 兆 : Else : 答案 = 個位(位數(1)) & 拾 & 個位(位數(2)) & 兆 : End If : 答案 &= 個位(位數(3)) & 仟 If 位數(4) = "0" And 位數(5) = "0" And 位數(6) = "0" Then : 答案 &= 億 ElseIf 位數(4) = "0" And 位數(5) = "0" And 位數(6) <> "0" Then : 答案 &= 零 & 個位(位數(6)) & 億 ElseIf 位數(4) = "0" And 位數(5) <> "0" And 位數(6) <> "0" Then : 答案 &= 零 & 個位(位數(5)) & 拾 & 個位(位數(6)) & 億 ElseIf 位數(4) = "0" And 位數(5) <> "0" And 位數(6) = "0" Then : 答案 &= 零 & 個位(位數(5)) & 拾 & 億 ElseIf 位數(4) <> "0" And 位數(5) = "0" And 位數(6) = "0" Then : 答案 &= 個位(位數(4)) & 百 & 億 ElseIf 位數(4) <> "0" And 位數(5) = "0" And 位數(6) <> "0" Then : 答案 &= 個位(位數(4)) & 百 & 零 & 個位(位數(6)) & 億 ElseIf 位數(4) <> "0" And 位數(5) <> "0" And 位數(6) = "0" Then : 答案 &= 個位(位數(4)) & 百 & 個位(位數(5)) & 拾 & 億 ElseIf 位數(4) <> "0" And 位數(6) <> "0" And 位數(6) <> "0" Then : 答案 &= 個位(位數(4)) & 百 & 個位(位數(5)) & 拾 & 個位(位數(6)) & 億 End If If 位數(7) = "0" And 位數(8) = "0" And 位數(9) = "0" And 位數(10) = "0" Then ElseIf 位數(7) = "0" And 位數(8) = "0" And 位數(9) = "0" And 位數(10) <> "0" Then : 答案 &= 零 & 個位(位數(10)) & 萬 ElseIf 位數(7) = "0" And 位數(8) = "0" And 位數(9) <> "0" And 位數(10) = "0" Then : 答案 &= 零 & 個位(位數(9)) & 拾 & 萬 ElseIf 位數(7) = "0" And 位數(8) = "0" And 位數(9) <> "0" And 位數(10) <> "0" Then : 答案 &= 零 & 個位(位數(9)) & 拾 & 個位(位數(10)) & 萬 ElseIf 位數(7) = "0" And 位數(8) <> "0" And 位數(9) = "0" And 位數(10) = "0" Then : 答案 &= 零 & 個位(位數(8)) & 百 & 萬 ElseIf 位數(7) = "0" And 位數(8) <> "0" And 位數(9) = "0" And 位數(10) <> "0" Then : 答案 &= 零 & 個位(位數(8)) & 百 & 零 & 個位(位數(10)) & 萬 ElseIf 位數(7) = "0" And 位數(8) <> "0" And 位數(9) <> "0" And 位數(10) = "0" Then : 答案 &= 零 & 個位(位數(8)) & 百 & 個位(位數(9)) & 拾 & 萬 ElseIf 位數(7) = "0" And 位數(8) <> "0" And 位數(9) <> "0" And 位數(10) <> "0" Then : 答案 &= 零 & 個位(位數(8)) & 百 & 個位(位數(9)) & 拾 & 個位(位數(10)) & 萬 ElseIf 位數(7) <> "0" And 位數(8) = "0" And 位數(9) = "0" And 位數(10) = "0" Then : 答案 &= 個位(位數(7)) & 仟 & 萬 ElseIf 位數(7) <> "0" And 位數(8) = "0" And 位數(9) = "0" And 位數(10) <> "0" Then : 答案 &= 個位(位數(7)) & 仟 & 零 & 個位(位數(10)) & 萬 ElseIf 位數(7) <> "0" And 位數(8) = "0" And 位數(9) <> "0" And 位數(10) = "0" Then : 答案 &= 個位(位數(7)) & 仟 & 零 & 個位(位數(9)) & 拾 & 萬 ElseIf 位數(7) <> "0" And 位數(8) = "0" And 位數(9) <> "0" And 位數(10) <> "0" Then : 答案 &= 個位(位數(7)) & 仟 & 零 & 個位(位數(9)) & 拾 & 個位(位數(10)) & 萬 ElseIf 位數(7) <> "0" And 位數(8) <> "0" And 位數(9) = "0" And 位數(10) = "0" Then : 答案 &= 個位(位數(7)) & 仟 & 個位(位數(8)) & 百 & 萬 ElseIf 位數(7) <> "0" And 位數(8) <> "0" And 位數(9) = "0" And 位數(10) <> "0" Then : 答案 &= 個位(位數(7)) & 仟 & 個位(位數(8)) & 百 & 零 & 個位(位數(10)) & 萬 ElseIf 位數(7) <> "0" And 位數(8) <> "0" And 位數(9) <> "0" And 位數(10) = "0" Then : 答案 &= 個位(位數(7)) & 仟 & 個位(位數(8)) & 百 & 個位(位數(9)) & 拾 & 萬 ElseIf 位數(7) <> "0" And 位數(8) <> "0" And 位數(9) <> "0" And 位數(10) <> "0" Then : 答案 &= 個位(位數(7)) & 仟 & 個位(位數(8)) & 百 & 個位(位數(9)) & 拾 & 個位(位數(10)) & 萬 End If If 位數(11) = "0" And 位數(12) = "0" And 位數(13) = "0" And 末位數 = "0" Then ElseIf 位數(11) = "0" And 位數(12) = "0" And 位數(13) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(末位數) ElseIf 位數(11) = "0" And 位數(12) = "0" And 位數(13) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(13)) & 拾 ElseIf 位數(11) = "0" And 位數(12) = "0" And 位數(13) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(13)) & 拾 & 個位(末位數) ElseIf 位數(11) = "0" And 位數(12) <> "0" And 位數(13) = "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(12)) & 百 ElseIf 位數(11) = "0" And 位數(12) <> "0" And 位數(13) = "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(12)) & 百 & 零 & 個位(末位數) ElseIf 位數(11) = "0" And 位數(12) <> "0" And 位數(13) <> "0" And 末位數 = "0" Then : 答案 &= 零 & 個位(位數(12)) & 百 & 個位(位數(13)) & 拾 ElseIf 位數(11) = "0" And 位數(12) <> "0" And 位數(13) <> "0" And 末位數 <> "0" Then : 答案 &= 零 & 個位(位數(12)) & 百 & 個位(位數(13)) & 拾 & 個位(末位數) ElseIf 位數(11) <> "0" And 位數(12) = "0" And 位數(13) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(11)) & 仟 ElseIf 位數(11) <> "0" And 位數(12) = "0" And 位數(13) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(11)) & 仟 & 零 & 個位(末位數) ElseIf 位數(11) <> "0" And 位數(12) = "0" And 位數(13) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(11)) & 仟 & 零 & 個位(位數(13)) & 拾 ElseIf 位數(11) <> "0" And 位數(12) = "0" And 位數(13) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(11)) & 仟 & 零 & 個位(位數(13)) & 拾 & 個位(末位數) ElseIf 位數(11) <> "0" And 位數(12) <> "0" And 位數(13) = "0" And 末位數 = "0" Then : 答案 &= 個位(位數(11)) & 仟 & 個位(位數(12)) & 百 ElseIf 位數(11) <> "0" And 位數(12) <> "0" And 位數(13) = "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(11)) & 仟 & 個位(位數(12)) & 百 & 零 & 個位(末位數) ElseIf 位數(11) <> "0" And 位數(12) <> "0" And 位數(13) <> "0" And 末位數 = "0" Then : 答案 &= 個位(位數(11)) & 仟 & 個位(位數(12)) & 百 & 個位(位數(13)) & 拾 ElseIf 位數(11) <> "0" And 位數(12) <> "0" And 位數(13) <> "0" And 末位數 <> "0" Then : 答案 &= 個位(位數(11)) & 仟 & 個位(位數(12)) & 百 & 個位(位數(13)) & 拾 & 個位(末位數) End If End If End If If 系統語言 = "繁體中文" Then : 金額大寫_tb.Text = 答案 & " 元整" ElseIf 系統語言 = "Indonesian" Then : 金額大寫_tb.Text = 答案 & " Rupiah" ElseIf 系統語言 = "English" Then : 金額大寫_tb.Text = 答案 & " Rupee" : End If End Sub Private Sub 年份2_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 年份2_cb.SelectedIndexChanged If 首次開啟 = False Then : Set_清單1() : End If End Sub Private Sub 年份2_cb_Click(sender As Object, e As EventArgs) Handles 年份2_cb.Click CB選擇清單(年份2_cb, 年份2_cb.Text) End Sub Private Sub 月份2_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 月份2_cb.SelectedIndexChanged If 月份2_cb.Text = "01" Then : SK1 = "I/" : ElseIf 月份2_cb.Text = "02" Then : SK1 = "II/" : ElseIf 月份2_cb.Text = "03" Then : SK1 = "III/" ElseIf 月份2_cb.Text = "04" Then : SK1 = "IV/" : ElseIf 月份2_cb.Text = "05" Then : SK1 = "V/" : ElseIf 月份2_cb.Text = "06" Then : SK1 = "VI/" ElseIf 月份2_cb.Text = "07" Then : SK1 = "VII/" : ElseIf 月份2_cb.Text = "08" Then : SK1 = "VIII/" : ElseIf 月份2_cb.Text = "09" Then : SK1 = "IX/" ElseIf 月份2_cb.Text = "10" Then : SK1 = "X/" : ElseIf 月份2_cb.Text = "11" Then : SK1 = "XI/" : ElseIf 月份2_cb.Text = "12" Then : SK1 = "XII/" : End If If 首次開啟 = False Then : Set_清單1() : End If End Sub Private Sub 月份2_cb_Click(sender As Object, e As EventArgs) Handles 月份2_cb.Click CB選擇清單(月份2_cb, 月份2_cb.Text) End Sub Private Sub Set_日期格式轉換() DTP = Strings.Format(Today(), "yyyy/MM/dd") : DTP1 = Strings.Format(Today(), "yyyyMMdd") End Sub Private Sub 審核通過_bt_Click(sender As Object, e As EventArgs) Handles 審核通過_bt.Click If 主管_tb.Text = "" And 系統單號_bt.Text <> "" Then : 主管_tb.Text = gUserName : SQL_財物支付單修改_主管(系統單號_bt.Text, 主管_tb.Text) If 主管_tb.Text = "李協叡" Then : LIN訊息通知("CC211", "李協叡", 單號_tb.Text, "已通過審核") : Else LIN訊息通知("CC211", 出納人員, 單號_tb.Text, "已通過審核") : LIN訊息通知("CC211", "李協叡", 單號_tb.Text, "已通過審核") End If : Set_清單1() : 清空介面() End If End Sub Private Sub 單據作廢_bt_Click(sender As Object, e As EventArgs) Handles 單據作廢_bt.Click If 系統單號_bt.Text = "" Then : MGB(對話框(3), 1) : 首次開啟 = False : Else PA42 = 系統單號_bt.Text : SQL_財物最高主管審核_作廢() : conn.Close() : MGB(對話框(5), 1) : PA = "" : 首次開啟 = False : Set_清單1() LIN訊息通知("CC211", 出納人員, 單號_tb.Text, "未通過審核,單據做廢") : LIN訊息通知("CC211", "李協叡", 單號_tb.Text, "未通過審核,單據做廢") End If End Sub Private Sub 語轉扭_bt_Click(sender As Object, e As EventArgs) Handles 語轉扭_bt.Click 介面 = "H314" : 語言轉換讀取() : Set_清單1() : 第一層下拉表單資料載入() : 幣別_cb.SelectedIndex = 3 : 編號1_cb.Text = "B-02" : 修改BT() : Set_清單1() End Sub Private Sub HX_ch_CheckedChanged(sender As Object, e As EventArgs) Handles HX_ch.Click HX_ch.Checked = True : PGS_ch.Checked = False : ALL_ch.Checked = False : Set_清單1() End Sub Private Sub PGS_ch_CheckedChanged(sender As Object, e As EventArgs) Handles PGS_ch.Click HX_ch.Checked = False : PGS_ch.Checked = True : ALL_ch.Checked = False : Set_清單1() End Sub Private Sub ALL_ch_CheckedChanged(sender As Object, e As EventArgs) Handles ALL_ch.Click HX_ch.Checked = False : PGS_ch.Checked = False : ALL_ch.Checked = True : Set_清單1() End Sub Private Sub 當月_bt_Click(sender As Object, e As EventArgs) Handles 當月_bt.Click If 月_ch.Checked Then 開始日期_dtp.Value = New Date(Today.Year, Today.Month, 1) : 結束日期_dtp.Value = 開始日期_dtp.Value.AddMonths(1).AddDays(-1) ElseIf 週_ch.Checked Then 開始日期_dtp.Value = Today.AddDays(-Today.DayOfWeek) : 結束日期_dtp.Value = Today.AddDays(6 - Today.DayOfWeek) ElseIf 日_ch.Checked Then 開始日期_dtp.Value = Today : 結束日期_dtp.Value = Today End If End Sub Private Sub 上個月_bt_Click(sender As Object, e As EventArgs) Handles 上個月_bt.Click If 月_ch.Checked Then : Dim today As Date = 開始日期_dtp.Value Dim 前一個月第一天 As Date = today.AddMonths(-1).AddDays(1 - today.Day) : Dim 前一個月最後一天 As Date = 前一個月第一天.AddMonths(1).AddDays(-1) 開始日期_dtp.Value = 前一個月第一天 : 結束日期_dtp.Value = 前一個月最後一天 ElseIf 週_ch.Checked Then Dim today As Date = 開始日期_dtp.Value : Dim 前一週第一天 As Date = today.AddDays(-7) : Dim 前一週最後一天 As Date = today.AddDays(-1) 開始日期_dtp.Value = 前一週第一天 : 結束日期_dtp.Value = 前一週最後一天 ElseIf 日_ch.Checked Then Dim today As Date = 開始日期_dtp.Value : 開始日期_dtp.Value = today.AddDays(-1) : 結束日期_dtp.Value = today.AddDays(-1) End If End Sub Private Sub 下個月_bt_Click(sender As Object, e As EventArgs) Handles 下個月_bt.Click If 月_ch.Checked Then : Dim today As Date = 開始日期_dtp.Value Dim 下個月第一天 As Date = today.AddMonths(1).AddDays(-today.Day + 1) : Dim 下個月最後一天 As Date = 下個月第一天.AddMonths(1).AddDays(-1) 開始日期_dtp.Value = 下個月第一天 : 結束日期_dtp.Value = 下個月最後一天 ElseIf 週_ch.Checked Then Dim today As Date = 開始日期_dtp.Value : Dim 下一週第一天 As Date = today.AddDays(7) : Dim 下一週最後一天 As Date = today.AddDays(13) 開始日期_dtp.Value = 下一週第一天 : 結束日期_dtp.Value = 下一週最後一天 ElseIf 日_ch.Checked Then Dim today As Date = 開始日期_dtp.Value : 開始日期_dtp.Value = today.AddDays(1) : 結束日期_dtp.Value = today.AddDays(1) End If End Sub Private Sub 結束日期_dtp_ValueChanged(sender As Object, e As EventArgs) Handles 結束日期_dtp.ValueChanged If 已開啟 Then : Set_清單1() : End If End Sub Private Sub 月_ch_Click(sender As Object, e As EventArgs) Handles 月_ch.Click 月_ch.Checked = True : 週_ch.Checked = False : 日_ch.Checked = False : 修改BT() : 當月_bt.PerformClick() End Sub Private Sub 週_ch_Click(sender As Object, e As EventArgs) Handles 週_ch.Click 月_ch.Checked = False : 週_ch.Checked = True : 日_ch.Checked = False : 修改BT() : 當月_bt.PerformClick() End Sub Private Sub 日_ch_Click(sender As Object, e As EventArgs) Handles 日_ch.Click 月_ch.Checked = False : 週_ch.Checked = False : 日_ch.Checked = True : 修改BT() : 當月_bt.PerformClick() End Sub Private Sub 風格() If 深色風格 = False Then Me.BackColor = SystemColors.Control 財務單號_lb.ForeColor = Color.Black : Label1.ForeColor = Color.Black : Label2.ForeColor = Color.Black Label3.ForeColor = Color.Black : Label4.ForeColor = Color.Black : Label5.ForeColor = Color.Black : 會計科目_lb.ForeColor = Color.Black Label6.ForeColor = Color.Black : Label7.ForeColor = Color.Black : Label8.ForeColor = Color.Black : Label9.ForeColor = Color.Black Label10.ForeColor = Color.Black : Label11.ForeColor = Color.Black : Label12.ForeColor = Color.Black : Label13.ForeColor = Color.Black Label14.ForeColor = Color.Black : HX_ch.ForeColor = Color.Black : PGS_ch.ForeColor = Color.Black : ALL_ch.ForeColor = Color.Black Label18.ForeColor = Color.Black : Label17.ForeColor = Color.Black : Label15.ForeColor = Color.Black : Label16.ForeColor = Color.Black Label19.ForeColor = Color.Black 單號_tb.BackColor = Color.White : 單號_tb.ForeColor = Color.Black : 部門選單_cb.BackColor = Color.White : 部門選單_cb.ForeColor = Color.Black 申請金額_nud.BackColor = Color.White : 申請金額_nud.ForeColor = Color.Black : 金額大寫_tb.BackColor = Color.White : 金額大寫_tb.ForeColor = Color.Black 內容_tb.BackColor = Color.White : 內容_tb.ForeColor = Color.Black : 支付對象_tb.BackColor = Color.White : 支付對象_tb.ForeColor = Color.Black 第二層_cb.BackColor = Color.White : 第二層_cb.ForeColor = Color.Black : 第三層_cb.BackColor = Color.White : 第三層_cb.ForeColor = Color.Black 申請人_tb.BackColor = Color.White : 申請人_tb.ForeColor = Color.Black : 年份2_cb.BackColor = Color.White : 年份2_cb.ForeColor = Color.Black 月份2_cb.BackColor = Color.White : 月份2_cb.ForeColor = Color.Black : 審核人_tb.BackColor = Color.White : 審核人_tb.ForeColor = Color.Black 營行帳號_tb.BackColor = Color.White : 營行帳號_tb.ForeColor = Color.Black : 支付銀行_tb.BackColor = Color.White : 支付銀行_tb.ForeColor = Color.Black 銀行支行_tb.BackColor = Color.White : 銀行支行_tb.ForeColor = Color.Black : 檢查人_tb.BackColor = Color.White : 檢查人_tb.ForeColor = Color.Black 主管_tb.BackColor = Color.White : 主管_tb.ForeColor = Color.Black 審核通過_bt.BackColor = Color.White : 單據作廢_bt.BackColor = Color.White 財務收支單_dgv.EnableHeadersVisualStyles = True : 財務收支單_dgv.BackgroundColor = Color.White : 財務收支單_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.Black 財務收支單_dgv.DefaultCellStyle.BackColor = Color.White : 財務收支單_dgv.DefaultCellStyle.ForeColor = Color.Black Else Me.BackColor = Color.Black 財務單號_lb.ForeColor = Color.White : Label1.ForeColor = Color.White : Label2.ForeColor = Color.White Label3.ForeColor = Color.White : Label4.ForeColor = Color.White : Label5.ForeColor = Color.White : 會計科目_lb.ForeColor = Color.White Label6.ForeColor = Color.White : Label7.ForeColor = Color.White : Label8.ForeColor = Color.White : Label9.ForeColor = Color.White Label10.ForeColor = Color.White : Label11.ForeColor = Color.White : Label12.ForeColor = Color.White : Label13.ForeColor = Color.White Label14.ForeColor = Color.White : HX_ch.ForeColor = Color.White : PGS_ch.ForeColor = Color.White : ALL_ch.ForeColor = Color.White Label18.ForeColor = Color.White : Label17.ForeColor = Color.White : Label15.ForeColor = Color.White : Label16.ForeColor = Color.White Label19.ForeColor = Color.White 單號_tb.BackColor = Color.DimGray : 單號_tb.ForeColor = Color.White : 部門選單_cb.BackColor = Color.DimGray : 部門選單_cb.ForeColor = Color.White 申請金額_nud.BackColor = Color.DimGray : 申請金額_nud.ForeColor = Color.White : 金額大寫_tb.BackColor = Color.DimGray : 金額大寫_tb.ForeColor = Color.White 內容_tb.BackColor = Color.DimGray : 內容_tb.ForeColor = Color.White : 支付對象_tb.BackColor = Color.DimGray : 支付對象_tb.ForeColor = Color.White 第二層_cb.BackColor = Color.DimGray : 第二層_cb.ForeColor = Color.White : 第三層_cb.BackColor = Color.DimGray : 第三層_cb.ForeColor = Color.White 申請人_tb.BackColor = Color.DimGray : 申請人_tb.ForeColor = Color.White : 年份2_cb.BackColor = Color.DimGray : 年份2_cb.ForeColor = Color.White 月份2_cb.BackColor = Color.DimGray : 月份2_cb.ForeColor = Color.White : 審核人_tb.BackColor = Color.DimGray : 審核人_tb.ForeColor = Color.White 營行帳號_tb.BackColor = Color.DimGray : 營行帳號_tb.ForeColor = Color.White : 支付銀行_tb.BackColor = Color.DimGray : 支付銀行_tb.ForeColor = Color.White 銀行支行_tb.BackColor = Color.DimGray : 銀行支行_tb.ForeColor = Color.White : 檢查人_tb.BackColor = Color.DimGray : 檢查人_tb.ForeColor = Color.White 主管_tb.BackColor = Color.DimGray : 主管_tb.ForeColor = Color.White 審核通過_bt.BackColor = Color.DimGray : 單據作廢_bt.BackColor = Color.DimGray 財務收支單_dgv.EnableHeadersVisualStyles = False : 財務收支單_dgv.BackgroundColor = Color.DimGray : 財務收支單_dgv.ColumnHeadersDefaultCellStyle.ForeColor = Color.White 財務收支單_dgv.ColumnHeadersDefaultCellStyle.BackColor = Color.Black : 財務收支單_dgv.DefaultCellStyle.BackColor = Color.Black 財務收支單_dgv.DefaultCellStyle.ForeColor = Color.White End If End Sub End Class