책 내용 질문하기
온라인 채점 결과 문의
도서
2026 시나공 컴퓨터활용능력1급 실기 기본서
페이지
0
조회수
8
작성일
2026-01-16
작성자
윤*진
첨부파일
2026_실전모의고사_C형
-3. 프로시저 작업 10/15
-폼 프로시저 X [cmd조회_Click] 매크로가 정답과 다릅니다.
이게 제가 쓴 답이고
Private Sub cmd조회_Click()
입력행 = [a3].Row + [a3].CurrentRegion.Rows.Count - 1
txt반명.Value = Cells(입력행, 1)
txt이름.Value = Cells(입력행, 2)
txt1차.Value = Cells(입력행, 3)
txt2차.Value = Cells(입력행, 4)
txt합계.Value = Cells(입력행, 3) + Cells(입력행, 4)
End Sub
답지에는 이렇게 나와있습니다.
Private Sub cmd조회_Click()
입력행 = [a3].Row + [a3].CurrentRegion.Rows.Count - 1
txt반명.Value = Cells(입력행, 1)
txt이름.Value = Cells(입력행, 2)
txt1차.Value = Cells(입력행, 3)
txt2차.Value = Cells(입력행, 4)
txt합계.Value = Val(txt1차.Value) + Val(txt2차.Value)
End Sub
마지막 txt합계 부분이 다른데 저처럼 쓰면 틀린건가요?