金额小写转中文大写财务人员专用(附源代码)vb

9次阅读
没有评论

Private Sub Command1_Click()
Dim dx As String
Dim dw As String
Dim s As String, c As String
Dim ch As String
Dim i As Integer
dw = "零壹佰拾萬仟佰拾元"
dx = "零壹贰叁肆伍陆柒捌玖"
s = Text1.Text
If Len(s) > 9 Then
Text2.Text = "输入的数据超出所能转换的范围"
Else
For i = 1 To Len(s)
ch = Mid(s, i, 1)
c = c + Mid(dx, Val(ch) + 1, 1) + Mid(dw, 9 - Len(s) + i, 1)
Next i
Text2.Text = c + "整"
End If
End Sub

正文完
 0
116博客
版权声明:本篇文章由 116博客 于2024-12-26发表,共计289字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
验证码