加入收藏 | 设为首页 | 会员中心 | 我要投稿 厦门网 (https://www.xiamenwang.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长百科 > 正文

VB加零函数

发布时间:2020-12-24 09:08:48 所属栏目:站长百科 来源:网络整理
导读:Public Function AddZero(strTmp As String) As String '添加0 Dim intCD,intCDC As Integer intCD = Len(strTmp) intCDC = 10 - intCD If intCDC 0 Then Dim strZCD As String strZCD = String(intCDC,"0") ElseIf intCDC = 0 Then AddZero = strTmp Exit F

Public Function AddZero(strTmp As String) As String '添加0
    Dim intCD,intCDC As Integer
    intCD = Len(strTmp)
    intCDC = 10 - intCD
    If intCDC > 0 Then
        Dim strZCD As String
        strZCD = String(intCDC,"0")
    ElseIf intCDC = 0 Then
        AddZero = strTmp
        Exit Function
    Else
        MsgBox "长度已超出10000000000位,请与系统管理员联系",vbCritical,"错误"
        AddZero = ""
        Exit Function
    End If
    AddZero = strZCD + strTmp
End Function

(编辑:厦门网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读