Contents

조회 수 54336 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
DefSng A-Z
Dim a(10), b(10), c(10), d(10) As String, e(10), f(10), g(10), h(10), l(10), pc, a1(10), b1(10), c1(10), tmp As Variant
Private Sub Command1_Click()
    pc = pc + 1
    a(pc) = Text1.Text
    b(pc) = Text2.Text
    c(pc) = Text3.Text

    a1(pc) = Text1.Text
    b1(pc) = Text2.Text
    c1(pc) = Text3.Text

    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""

    Text1.SetFocus

End Sub

Private Sub Command2_Click()
    For i = 1 To pc - 1
        For j = i + 1 To pc
            If a(i) > a(j) Then
                tmp = a(i): a(i) = a(j): a(j) = tmp
                tmp = b(i): b(i) = b(j): b(j) = tmp
                tmp = c(i): c(i) = c(j): c(j) = tmp
            End If
        Next j
    Next i

    For i = 1 To pc

        e(i) = c(i) * 20000

        If b(i) = 21 Then
            d(i) = "사원"
            x = 1000000
        
            Select Case e(i)
                Case Is >= 1000000: f(i) = 50000
                Case Is >= 500000: f(i) = 30000
                Case Is < 500000: f(i) = 0
            End Select
        Else
            d(i) = "대리"
            x = 1500000
        
            Select Case e(i)
                Case Is >= 1000000: f(i) = 100000
                Case Is >= 500000: f(i) = 50000
                Case Is < 500000: f(i) = 0
            End Select
        End If

        g(i) = x + f(i)
    Next

    For i = 1 To pc
        s = 1
        For j = 1 To pc
            If g(i) < g(j) Then
                s = s + 1
            End If
        Next
            
        h(i) = s
    Next

    Form1.Hide
    Form2.Show

    Form2.Print "비번호: 123"
    Form2.Print "사원번호", "직위", "매출금", "보너스", "총합계", "순위"

    For i = 1 To pc
        Form2.Print a(i), d(i), e(i), f(i), g(i), h(i)
    Next

    Form2.Print ""
    Form2.Print "입력자료"
    
    For i = 1 To pc
        Form2.Print a1(i), b1(i), c1(i)
    Next
    
End Sub


?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
841 Develop '2014 모바일 개발 트렌드' 발표자료입니다. file hooni 2014.10.02 974
840 Develop Aspect Oriented Programming in Objective-C hooni 2015.05.18 672
839 Develop DDay Memo 1.9.4 소스코드 secret hooni 2015.10.03 0
838 Develop GCM 사용하기 2 (단말에 GCM 구현하기) file hooni 2013.07.06 23248
837 Develop GCM 사용하기 3 (JSP로 GCM 푸시 서버 만들기) 4 file hooni 2013.07.06 25315
836 Develop git 브런치 배우기 (링크) hooni 2013.07.09 20571
835 Develop GPL, AGPL, MPL,.. 한눈에 보는 오픈소스SW 라이선스 file hooni 2014.10.14 1144
834 Develop How to Test SMTP AUTH using Telnet hooni 2018.04.05 1323
833 Develop JSON, BSON 변환 file hooni 2013.04.23 11814
832 Develop Laravel 5 Failed opening required bootstrap/../vendor/autoload.php hooni 2018.01.24 1643
831 Develop Mac OS 에 Jenkins 설치하기 (Homebrew) 2 file hooni 2017.03.15 8065
830 Develop macOS에 node, npm 설치하기 (homebrew) file hooni 2021.11.06 1126
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 71 Next
/ 71