Private Sub Form_Activate()
Dim t As Integer
t = Val(InputBox("숫자입력", "숫자입력"))
If t < 10 Or t > 30 Then
MsgBox "10에서30사이수를입력", vbCritical + vbOKOnly
t = Val(InputBox("숫자입력", "숫자입력"))
End If
For i = 10 To t
Print "2^" & i & "= " & 2 ^ i
Next
End Sub
--------------------------------------------------------------------------------------
Private Sub Form_Click()
Dim n As Integer
Dim msg As String
msg = InputBox("문자입력", "문자입력하시오")
For n = 1 To Len(msg)
Print Left(msg, n)
Next
For n = Len(msg) To 1 Step (-1)
Print Left(msg, n)
Next
End Sub
Dim t As Integer
t = Val(InputBox("숫자입력", "숫자입력"))
If t < 10 Or t > 30 Then
MsgBox "10에서30사이수를입력", vbCritical + vbOKOnly
t = Val(InputBox("숫자입력", "숫자입력"))
End If
For i = 10 To t
Print "2^" & i & "= " & 2 ^ i
Next
End Sub
--------------------------------------------------------------------------------------
Private Sub Form_Click()
Dim n As Integer
Dim msg As String
msg = InputBox("문자입력", "문자입력하시오")
For n = 1 To Len(msg)
Print Left(msg, n)
Next
For n = Len(msg) To 1 Step (-1)
Print Left(msg, n)
Next
End Sub
댓글
댓글 쓰기