Contents

Views 54338 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
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
No. Category Subject Author Date Views
253 Develop [java] 채팅창 처럼.. swing.. file hooni 2013.04.23 8769
252 Develop [java] 채팅창 처럼2.. swing.. file hooni 2013.04.23 6421
251 Develop [java] 초간단 싱글톤(Singleton) 패턴 샘플 코드 file hooni 2013.11.18 11595
250 Develop [java] 컴포넌트 배치 ㅡ.,ㅡ; hooni 2003.04.23 7147
249 Develop [java] 파일 라인수 계산하는 프로그램 (하위 디렉토리까지..) file hooni 2013.04.23 7646
248 Develop [json] 종결자 (설명과 웹, C/C++/C# 프로그램 샘플 코드) file hooni 2013.04.23 71971
247 Develop [jsp] Get방식, Post방식 전송 예제.. file hooni 2003.04.23 13758
246 Develop [jsp] HelloServlet 출력문 file hooni 2003.04.23 7790
245 Develop [jsp] RSS(xml) 파싱해서 보여주기 ㅎㅎ file hooni 2013.04.23 13208
244 Develop [jsp] 유효성체크(Client, Server 에서) file hooni 2003.04.23 7418
243 Develop [jsp] 정적/동적(차트생성) 이미지 전달 file hooni 2003.04.23 7307
242 Develop [jsp] 초간단한 include 구문 예제.. file hooni 2013.04.23 7227
Board Pagination Prev 1 ... 45 46 47 48 49 50 51 52 53 54 ... 71 Next
/ 71