Option Explicit
'모든 변수는 Dim을 사용하여 선언을 하여야 사용을 할수 있음.
Sub Sample2()
Range("A" & "1") = "this is target cell"
'target cell 지정
'**** 배열
Dim arr(2) As String
arr(0) = "1st array"
arr(1) = "2nd array"
MsgBox arr(0) + " " + arr(1)
MsgBox arr(0) & " " & arr(1)
MsgBox a(1)
'*** For문
For i = 1 To 5
If i = 5 Then
Exit For 'For문을 끝냄
End If
Next
End Sub
'***Function은 유저 프롯시저를 작성하기 위한 프로시저.
Function a(para1 As Integer) As String
a = "<" + Str(para1) + ">"
End Function
'모든 변수는 Dim을 사용하여 선언을 하여야 사용을 할수 있음.
Sub Sample2()
Range("A" & "1") = "this is target cell"
'target cell 지정
'**** 배열
Dim arr(2) As String
arr(0) = "1st array"
arr(1) = "2nd array"
MsgBox arr(0) + " " + arr(1)
MsgBox arr(0) & " " & arr(1)
MsgBox a(1)
'*** For문
For i = 1 To 5
If i = 5 Then
Exit For 'For문을 끝냄
End If
Next
End Sub
'***Function은 유저 프롯시저를 작성하기 위한 프로시저.
Function a(para1 As Integer) As String
a = "<" + Str(para1) + ">"
End Function