中耳炎的吃什么消炎药:vb 数字大小写转换
来源:百度文库 编辑:中财网 时间:2024/04/29 03:35:33
Function myP_cton(s As String) As Integer ' 汉字转为数字(全能项数)
Dim intSn As Integer
If s Like "*一*" Then intSn = 1
If s Like "*二*" Then intSn = 2
If s Like "*三*" Then intSn = 3
If s Like "*四*" Then intSn = 4
If s Like "*五*" Then intSn = 5
If s Like "*六*" Then intSn = 6
If s Like "*七*" Then intSn = 7
If s Like "*八*" Then intSn = 8
If s Like "*九*" Then intSn = 9
If s Like "*十*" Then intSn = 10
myP_cton = intSn
End Function
Function myP_Ntoc(n As Integer) As String ' 数字转为汉字(全能项数)
Dim strSz As String
If n = 1 Then strSz = "一"
If n = 2 Then strSz = "二"
If n = 3 Then strSz = "三"
If n = 4 Then strSz = "四"
If n = 5 Then strSz = "五"
If n = 6 Then strSz = "六"
If n = 7 Then strSz = "七"
If n = 8 Then strSz = "八"
If n = 9 Then strSz = "九"
If n = 10 Then strSz = "十"
myP_Ntoc = strSz
End Function