반응형
숫자를 복사해서 붙여넣어서 계산하고,
결과값도 복사가 가능한 계산기 입니다.
Public Class Form1
Dim nNum As Integer
Dim a() As String
Dim i As Integer
Dim b As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
b = 0
a = Split(TextBox1.Text, Chr(13)) ' Chr(13) = enter =new line
For Me.i = 0 To a.Length - 1
nNum = CType(a(i), Integer)
b += nNum
Next
TextBox2.Text = b
End Sub
End Class
반응형