5.1 VBA VBA Check Point 1. 2. 5.1.1 ( bug : ) (debug) On Error On Error On Error GoTo line < line > 5.1.1 < line > Cells(i, j) i, j 5.1.1 MsgBox Err.Description Err1: GoTo 0 74
Visual Basic VBA VBA Project / 5.1.2 (T) (O) 5.1.2 (K) 5.1.2 75
5.1.3 5.1.3 D VBE 5.1.4 5.1.3 VBA 5.1.4 VBA VBA D 5.1.5 VBAProject L 5.1.5 76
5.1.4 VBE D / T 5.1.6 77
5.1.5 100 80 5.1.7 5.1.7 Sub immediate1() For n=1 to 100 If Cells(n,1).Value= Then Exit For End if Cells(n,2).Value=Cells(n,1). Value*1.05 If Cells(n,2).Value>1000 Then Cells(n,2).Front.ColorIndex=3 End If Next End Sub 5.1.7 100 VBE (V) (I) 3 5.1.8 n=80 78
5.1.6 a. 5.1.9 VBE (V) (A) (E): OK 5.1.10 5.1.9 5.1.10 VBE (D) (I) 79
b. For m 5 x m < 5 5.1.12 Sub () Dim x As Integer x = 0 For n = 1 To 10 For m = 1 To 10 Cells(n, m).value = 0 x = x + m Next m Next n End Sub 5.1.11 m < 5 True m 5 False 5.1.3 5.1.12 5.1.13 80
5.2 Check Point 1. 2. 5.2.1 I U 5.2.1 5.2.2 UserForm1 5.2.1 UserForm1 5.2.2 5.2.3 CommandButton1 CommandButton1 81 5.2.2
UserForm1 5.2.3 5.2.4 5.2.4 5.2.3 UserForm1 CommandButton1 5.2.5 5.2.5 5.2.6 CommandButton1 0 99 5.2.6 5.2.7 CommandButton1 5.2.7 82
5.2.2 CommandButton1 UserForm1 CommandButton1 CommandButton1 5.2.8 Caption CommandButton1 5.2.8 1. 83
5.2.3 3 5.2.9 3 5.2.9 4 CommandButton4 5.2.10 1 5.2.11 jan jan 4.5 0 99 3 1/3 TextBox2 5.2.10 5.2.11 84
5.2.12 Select Case 1. 2. 85