문제 4-2번의 2번 문제의 프로시저를 정답과 똑같이 작성했는데도 안되는 것 같아요ㅜ 어디 부분이 틀린 걸까요?
Private Sub cmd예매_Click()
참조행 = cmb공연명.ListIndex + 5
입력행 = [C4].Row + [C4].CurrentRegion.Rows.Count
Cells(입력행, 3) = Date
Cells(입력행, 4) = txt공연장
Cells(입력행, 5) = cmb공연명
Cells(입력행, 6) = Val(txt좌석수)
Cells(입력행, 7) = Cells(참조행, 12)
Cells(입력행, 8) = Cells(참조행, 13)
Cells(입력행, 9) = Format(Cells(입력행, 6) * Cells(입력행, 8), "#,###원")
txt.공연장.SetFocus
Private Sub cmd예매_Click()
참조행 = cmb공연명.ListIndex + 5
입력행 = [C4].Row + [C4].CurrentRegion.Rows.Count
Cells(입력행, 3) = Date
Cells(입력행, 4) = txt공연장
Cells(입력행, 5) = cmb공연명
Cells(입력행, 6) = Val(txt좌석수)
Cells(입력행, 7) = Cells(참조행, 12)
Cells(입력행, 8) = Cells(참조행, 13)
Cells(입력행, 9) = Format(Cells(입력행, 6) * Cells(입력행, 8), "#,###원")
txt.공연장.SetFocus
End Sub
빨간색으로 표시된 부분에 오타가 있네요.
txt. 에서 .을 삭제하고 txt공연장 으로 사용하세요.
txt공연장.SetFocus
좋은 하루 되세요.
-
관리자2020-09-29 09:22:48
Private Sub cmd예매_Click()
참조행 = cmb공연명.ListIndex + 5
입력행 = [C4].Row + [C4].CurrentRegion.Rows.Count
Cells(입력행, 3) = Date
Cells(입력행, 4) = txt공연장
Cells(입력행, 5) = cmb공연명
Cells(입력행, 6) = Val(txt좌석수)
Cells(입력행, 7) = Cells(참조행, 12)
Cells(입력행, 8) = Cells(참조행, 13)
Cells(입력행, 9) = Format(Cells(입력행, 6) * Cells(입력행, 8), "#,###원")
txt.공연장.SetFocus
End Sub
빨간색으로 표시된 부분에 오타가 있네요.
txt. 에서 .을 삭제하고 txt공연장 으로 사용하세요.
txt공연장.SetFocus
좋은 하루 되세요.