확인란을 사용하여 "questionario"라는 양식을 만들고 모든 chebox가 비어있는 경우 msg 문을 보내도록 IF 문을 작성했습니다. 그러나 매크로를 실행하면 따옴표로 묶은 줄에 오류 (오류 438)가 발생합니다.이 줄에 어떤 현상이 있습니까?
Private Sub CommandButton1_Click()
Dim ind As Integer
Dim cont As MSForms.Control
ind = 0
If questionario.resp1.Value = True Then
Range("E8").Value = Range("E8").Value + 1
End If
If questionario.resp2.Value = True Then
Range("F8").Value = Range("F8").Value + 1
End If
If questionario.resp3.Value = True Then
Range("G8").Value = Range("G8").Value + 1
End If
For Each cont In questionario.Controls
만약 두 단계로 (TYPENAME (계속) = "확인란") 그리고 (cont.Value = 참) 다음
ind = ind + 1
End If
Next
If ind = 0 Then
MsgBox "mmm"
Else
questionario.Hide
Set questionario = Nothing
End If
End Sub
'cont.TypeName = ...'일을 시도해 볼 수 있습니까? – nbayly
시도했지만, 문제가 'And (cont.Value = True)'부분과 같다고 생각합니다. –