|
* 답변하시는 분들께 도움이 되도록 자신의 환경을 아래 항목 옆에 기재해 주세요.
1. 엑셀 버전(95,97,2000,2002): 2002
2. 윈도우즈의 버전(win95,win98,winME,winNT,win2000,winXP): winXP
3. CPU (486,PentiumI/II/III/IV...): P4
4. RAM (32,64,128,256,512MB,1G...): 256
* 아래줄에 질문을 작성하세요 >>
안녕하세요. 매크로를 하나 만들다가, 에러가 계속 발생해서.. 이렇게 질문 드립니다.
제가 모르는 무슨 규칙이 있는 것 같아서요...
Sub Macro2()
Dim intLast_Cell As Integer
Dim strEntry1 As String
Dim intEntry2 As Integer
Do
intLast_Cell = ActiveSheet.Range("A1").End(xlDown).Row + 1
strEntry1 = Application.InputBox("Input the name")
If strEntry1 = "" Then
Exit Sub
End If
intEntry2 = Application.InputBox("Input the value", Type:=1)
If intEntry2 = "" Then ---------->>>>>>> 이 부분에서 계속 에러가 발생합니다.
Exit Sub
End If
Cells(intLast_Cell, 1) = strEntry1
Cells(intLast_Cell, 2) = intEntry2
Loop
End Sub
integer형으로 선언된 변수에 값이 들어 있지 않은 상태를 표현할려면, ""로 작성하면 안 되는 건지요? 안 된다면, 어떻게 표현해야 하는지요?
고맙습니다. |
|