Develop
2003.04.23 00:04
[vb] 비주얼 베이직 205페이지
Views 56144 Comment 0
DefSng A-Z
Dim a(10), b(10), c(10), d(10) As String, e(10), f(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
Select Case a(i)
Case 1: d(i) = "볼펜"
Case 2: d(i) = "연필"
Case 3: d(i) = "지우개"
Case 4: d(i) = "노트"
End Select
e(i) = Int((b(i) - c(i)) / b(i) * 100 + 0.5)
Select Case e(i)
Case Is <= 30: x = 2
Case Is <= 40: x = 1.5
Case Is <= 50: x = 1.2
Case Is >= 51: x = 0: s = s + 1
End Select
f(i) = c(i) * x
h = h + f(i)
Next
k = pc - s
Form1.Hide
Form2.Show
Form2.Print "제품번호", "제품명", "전월재고량", "출고수량", "재고율", "발주량"
Form2.Print ""
For i = 1 To pc
Form2.Print a(i), d(i), b(i), c(i), e(i), f(i)
Next
Form2.Print ""
Form2.Print "발주건수"; k
Form2.Print "발주량합계"; h
Form2.Print ""
Form2.Print ""
Form2.Print "입력자료"
For i = 1 To pc
Form2.Print a1(i), b1(i), c1(i)
Next
End Sub
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
84 | System/OS | 맥에서 포트 확인하고 닫기 (mac) | hooni | 2022.03.22 | 1238 |
83 | System/OS |
서버 확장을 위한 두 가지 방법
![]() |
hooni | 2018.08.29 | 2278 |
82 | Develop |
[ios] Requesting Location Permissions in iOS
![]() |
hooni | 2018.08.18 | 1746 |
81 | Database | [mysql] ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. | hooni | 2017.12.15 | 1398 |
80 | System/OS |
[linux] 초간단 Postfix, Covecot, SSL/TLS (SMTP)
![]() |
hooni | 2017.12.11 | 9528 |
79 | Develop |
[ios] Facebook SDK 로그인 설명
![]() |
hooni | 2017.04.19 | 1367 |
78 | Develop | [ios] NSString, RegularExpression Find/Replace | hooni | 2017.04.14 | 962 |
77 | Database | [mysql] 쿼리 실행시 ERROR 1366 (HY000) : incorrect string value : for column 3 | hooni | 2017.03.30 | 8983 |
76 | Develop |
[ios] Xcode에서 특정 파일만 ARC 따로 설정하는 방법
![]() |
hooni | 2017.03.29 | 1098 |
75 | Develop |
Mac OS 에 Jenkins 설치하기 (Homebrew)
2 ![]() |
hooni | 2017.03.15 | 8410 |
74 | Develop |
[ios] 동영상 플레이어 샘플 (for PIP Player)
![]() |
hooni | 2017.03.15 | 1413 |
73 | Develop |
[ios] Facebook Cache 갱신하는 함수
![]() |
hooni | 2017.02.27 | 1331 |