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原文链接:https://www.f2er.com/vb/259295.html