'======================================================
' 주민번호 검증 함수
'======================================================
Public Function IsJuminNum(ByVal strJuminNum As String) As Boolean
Dim iSum As Integer
Dim iRe As Integer
On Error GoTo Wrong_Number
strJuminNum = Char_Remove(strJuminNum)
If Len(strJuminNum) <> 13 Then
IsJuminNum = False
Exit Function
End If
If CInt(Mid(strJuminNum, 3, 2)) < 0 Or CInt(Mid(strJuminNum, 3, 2)) > 12 Or _
CInt(Mid(strJuminNum, 5, 2)) < 0 Or CInt(Mid(strJuminNum, 5, 2)) > 31 Or _
CInt(Mid(strJuminNum, 7, 1)) < 0 Or CInt(Mid(strJuminNum, 7, 1)) > 4 Then
IsJuminNum = False
Exit Function
End If
iSum = CInt(Mid(strJuminNum, 1, 1)) * 2 + _
CInt(Mid(strJuminNum, 2, 1)) * 3 + _
CInt(Mid(strJuminNum, 3, 1)) * 4 + _
CInt(Mid(strJuminNum, 4, 1)) * 5 + _
CInt(Mid(strJuminNum, 5, 1)) * 6 + _
CInt(Mid(strJuminNum, 6, 1)) * 7 + _
CInt(Mid(strJuminNum, 7, 1)) * 8 + _
CInt(Mid(strJuminNum, 8, 1)) * 9 + _
CInt(Mid(strJuminNum, 9, 1)) * 2 + _
CInt(Mid(strJuminNum, 10, 1)) * 3 + _
CInt(Mid(strJuminNum, 11, 1)) * 4 + _
CInt(Mid(strJuminNum, 12, 1)) * 5
iSum = iSum Mod 11
iRe = 11 - iSum
If iRe > 9 Then
iRe = iRe Mod 10
End If
iSum = CInt(Mid(strJuminNum, 13, 1))
If iSum = iRe Then
IsJuminNum = True
Else
IsJuminNum = False
End If
Exit Function
Wrong_Number:
IsJuminNum = False
End Function
'======================================================
' 사업자번호 검증 함수
'======================================================
Public Function IsSaupjaNo(ByVal strSaupjaNo As String) As Boolean
Dim iSum As Integer
Dim iRe As Integer
On Error GoTo Wrong_Number
strSaupjaNo = Char_Remove(strSaupjaNo)
If Len(strSaupjaNo) <> 10 Then
IsSaupjaNo = False
Exit Function
End If
iSum = ((CInt(Mid(strSaupjaNo, 9, 1)) * 5) \ 10) + _
((CInt(Mid(strSaupjaNo, 9, 1)) * 5) Mod 10) + _
CInt(Mid(strSaupjaNo, 1, 1)) + CInt(Mid(strSaupjaNo, 4, 1)) + CInt(Mid(strSaupjaNo, 7, 1)) + _
(CInt(Mid(strSaupjaNo, 2, 1)) + CInt(Mid(strSaupjaNo, 5, 1)) + CInt(Mid(strSaupjaNo, 8, 1))) * 3 + _
(CInt(Mid(strSaupjaNo, 3, 1)) + CInt(Mid(strSaupjaNo, 6, 1))) * 7
iSum = iSum Mod 10
If CInt(Mid(strSaupjaNo, 10, 1)) = ((10 - iSum) Mod 10) Then
IsSaupjaNo = True
Else
IsSaupjaNo = False
End If
Exit Function
Wrong_Number:
IsSaupjaNo = False
End Function<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 16:46:12 기타에서 이동 됨]</div>
' 주민번호 검증 함수
'======================================================
Public Function IsJuminNum(ByVal strJuminNum As String) As Boolean
Dim iSum As Integer
Dim iRe As Integer
On Error GoTo Wrong_Number
strJuminNum = Char_Remove(strJuminNum)
If Len(strJuminNum) <> 13 Then
IsJuminNum = False
Exit Function
End If
If CInt(Mid(strJuminNum, 3, 2)) < 0 Or CInt(Mid(strJuminNum, 3, 2)) > 12 Or _
CInt(Mid(strJuminNum, 5, 2)) < 0 Or CInt(Mid(strJuminNum, 5, 2)) > 31 Or _
CInt(Mid(strJuminNum, 7, 1)) < 0 Or CInt(Mid(strJuminNum, 7, 1)) > 4 Then
IsJuminNum = False
Exit Function
End If
iSum = CInt(Mid(strJuminNum, 1, 1)) * 2 + _
CInt(Mid(strJuminNum, 2, 1)) * 3 + _
CInt(Mid(strJuminNum, 3, 1)) * 4 + _
CInt(Mid(strJuminNum, 4, 1)) * 5 + _
CInt(Mid(strJuminNum, 5, 1)) * 6 + _
CInt(Mid(strJuminNum, 6, 1)) * 7 + _
CInt(Mid(strJuminNum, 7, 1)) * 8 + _
CInt(Mid(strJuminNum, 8, 1)) * 9 + _
CInt(Mid(strJuminNum, 9, 1)) * 2 + _
CInt(Mid(strJuminNum, 10, 1)) * 3 + _
CInt(Mid(strJuminNum, 11, 1)) * 4 + _
CInt(Mid(strJuminNum, 12, 1)) * 5
iSum = iSum Mod 11
iRe = 11 - iSum
If iRe > 9 Then
iRe = iRe Mod 10
End If
iSum = CInt(Mid(strJuminNum, 13, 1))
If iSum = iRe Then
IsJuminNum = True
Else
IsJuminNum = False
End If
Exit Function
Wrong_Number:
IsJuminNum = False
End Function
'======================================================
' 사업자번호 검증 함수
'======================================================
Public Function IsSaupjaNo(ByVal strSaupjaNo As String) As Boolean
Dim iSum As Integer
Dim iRe As Integer
On Error GoTo Wrong_Number
strSaupjaNo = Char_Remove(strSaupjaNo)
If Len(strSaupjaNo) <> 10 Then
IsSaupjaNo = False
Exit Function
End If
iSum = ((CInt(Mid(strSaupjaNo, 9, 1)) * 5) \ 10) + _
((CInt(Mid(strSaupjaNo, 9, 1)) * 5) Mod 10) + _
CInt(Mid(strSaupjaNo, 1, 1)) + CInt(Mid(strSaupjaNo, 4, 1)) + CInt(Mid(strSaupjaNo, 7, 1)) + _
(CInt(Mid(strSaupjaNo, 2, 1)) + CInt(Mid(strSaupjaNo, 5, 1)) + CInt(Mid(strSaupjaNo, 8, 1))) * 3 + _
(CInt(Mid(strSaupjaNo, 3, 1)) + CInt(Mid(strSaupjaNo, 6, 1))) * 7
iSum = iSum Mod 10
If CInt(Mid(strSaupjaNo, 10, 1)) = ((10 - iSum) Mod 10) Then
IsSaupjaNo = True
Else
IsSaupjaNo = False
End If
Exit Function
Wrong_Number:
IsSaupjaNo = False
End Function<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 16:46:12 기타에서 이동 됨]</div>
댓글 2개
디귿소프트
14년 전
베이직인가요?
14년 전
ASP 도 베이직문법이라.. ASP 일수도 있겠네요..
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7830 | 10년 전 | 481 | ||
| 7829 |
|
10년 전 | 667 | |
| 7828 | 10년 전 | 588 | ||
| 7827 | 10년 전 | 487 | ||
| 7826 | 10년 전 | 506 | ||
| 7825 | 10년 전 | 552 | ||
| 7824 | 10년 전 | 507 | ||
| 7823 | 10년 전 | 438 | ||
| 7822 | 10년 전 | 416 | ||
| 7821 | 10년 전 | 364 | ||
| 7820 | 10년 전 | 374 | ||
| 7819 |
|
10년 전 | 779 | |
| 7818 | 10년 전 | 438 | ||
| 7817 | 10년 전 | 614 | ||
| 7816 | 10년 전 | 456 | ||
| 7815 | 10년 전 | 658 | ||
| 7814 | 10년 전 | 492 | ||
| 7813 | 10년 전 | 440 | ||
| 7812 | 10년 전 | 455 | ||
| 7811 | 10년 전 | 431 | ||
| 7810 | 10년 전 | 632 | ||
| 7809 | 10년 전 | 568 | ||
| 7808 | 10년 전 | 450 | ||
| 7807 | 10년 전 | 461 | ||
| 7806 |
프로그래머7
|
10년 전 | 1378 | |
| 7805 | 10년 전 | 1323 | ||
| 7804 |
zahir1312
|
10년 전 | 821 | |
| 7803 |
|
10년 전 | 1429 | |
| 7802 | 10년 전 | 520 | ||
| 7801 | 10년 전 | 899 | ||
| 7800 | 10년 전 | 1118 | ||
| 7799 | 10년 전 | 600 | ||
| 7798 | 10년 전 | 546 | ||
| 7797 | 10년 전 | 577 | ||
| 7796 | 10년 전 | 409 | ||
| 7795 | 10년 전 | 560 | ||
| 7794 | 10년 전 | 598 | ||
| 7793 | 10년 전 | 1103 | ||
| 7792 | 10년 전 | 533 | ||
| 7791 | 10년 전 | 622 | ||
| 7790 | 10년 전 | 557 | ||
| 7789 |
fbastore
|
10년 전 | 1510 | |
| 7788 | 10년 전 | 608 | ||
| 7787 | 10년 전 | 468 | ||
| 7786 | 10년 전 | 671 | ||
| 7785 | 10년 전 | 647 | ||
| 7784 | 10년 전 | 706 | ||
| 7783 | 10년 전 | 524 | ||
| 7782 | 10년 전 | 549 | ||
| 7781 | 10년 전 | 956 | ||
| 7780 | 10년 전 | 860 | ||
| 7779 | 10년 전 | 809 | ||
| 7778 | 10년 전 | 400 | ||
| 7777 | 10년 전 | 520 | ||
| 7776 | 10년 전 | 512 | ||
| 7775 | 10년 전 | 446 | ||
| 7774 | 10년 전 | 658 | ||
| 7773 | 10년 전 | 417 | ||
| 7772 | 10년 전 | 794 | ||
| 7771 | 10년 전 | 450 | ||
| 7770 | 10년 전 | 688 | ||
| 7769 | 10년 전 | 450 | ||
| 7768 | 10년 전 | 669 | ||
| 7767 | 10년 전 | 1217 | ||
| 7766 | 10년 전 | 556 | ||
| 7765 | 10년 전 | 610 | ||
| 7764 |
잘살아보자
|
10년 전 | 464 | |
| 7763 |
|
10년 전 | 1514 | |
| 7762 |
Tosea
|
10년 전 | 1105 | |
| 7761 | 10년 전 | 724 | ||
| 7760 |
잘살아보자
|
10년 전 | 782 | |
| 7759 |
잘살아보자
|
10년 전 | 620 | |
| 7758 |
잘살아보자
|
10년 전 | 685 | |
| 7757 | 10년 전 | 1311 | ||
| 7756 |
ITBANK
|
10년 전 | 1312 | |
| 7755 | 10년 전 | 1971 | ||
| 7754 | 10년 전 | 1115 | ||
| 7753 | 10년 전 | 937 | ||
| 7752 | 10년 전 | 1437 | ||
| 7751 |
잘살아보자
|
10년 전 | 595 | |
| 7750 |
잘살아보자
|
10년 전 | 537 | |
| 7749 |
잘살아보자
|
10년 전 | 554 | |
| 7748 |
잘살아보자
|
10년 전 | 576 | |
| 7747 |
잘살아보자
|
10년 전 | 650 | |
| 7746 |
잘살아보자
|
10년 전 | 722 | |
| 7745 |
잘살아보자
|
10년 전 | 964 | |
| 7744 |
잘살아보자
|
10년 전 | 457 | |
| 7743 | 10년 전 | 996 | ||
| 7742 |
starbros
|
10년 전 | 883 | |
| 7741 |
잘살아보자
|
10년 전 | 729 | |
| 7740 |
잘살아보자
|
10년 전 | 619 | |
| 7739 |
잘살아보자
|
10년 전 | 503 | |
| 7738 |
잘살아보자
|
10년 전 | 576 | |
| 7737 |
잘살아보자
|
10년 전 | 557 | |
| 7736 |
잘살아보자
|
10년 전 | 575 | |
| 7735 |
잘살아보자
|
10년 전 | 905 | |
| 7734 |
잘살아보자
|
10년 전 | 470 | |
| 7733 |
잘살아보자
|
10년 전 | 576 | |
| 7732 |
잘살아보자
|
10년 전 | 743 | |
| 7731 |
잘살아보자
|
10년 전 | 665 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기