책 내용 질문하기
엑셀 p250
도서
2020 시나공 컴퓨터활용능력 1급 실기 [기본서]
페이지
250
조회수
246
작성일
2019-12-14
작성자
탈퇴*원

해설대로 입력하니 오류가 뜹니다. 원인과 해결책 알려주세요.

답변
2019-12-16 14:06:56

Private Sub cmd성별_Click()
    If chk성별 = True Then
        cmd성별.Caption = "남학생"
    Else
        cmd성별.Caption = "여학생"
End Sub

 

-> 위의 cmd성별을 아래와 같이 변경 하세요.

 

Private Sub chk성별_Click()
    If chk성별 = True Then
        cmd성별.Caption = "남학생"
    Else
        cmd성별.Caption = "여학생"

 

End If                  <- 추가하셔야 합니다.
End Sub

 

 


Private Sub txt국어_Change()
    txt국어 = spin국어 * 5
End Sub

Private Sub txt수학_Change()
    txt영어 = spin영어 * 5
End Sub

Private Sub txt영어_Change()
    txt수학 = spin수학 * 5
End Sub

 

-> 위의 빨간색 txt 부분을 spin 으로 변경 하세요.

 

Private Sub spin국어_Change()
    txt국어 = spin국어 * 5
End Sub

Private Sub spin수학_Change()
    txt수학 = spin수학 * 5
End Sub

Private Sub spin영어_Change()
    txt영어 = spin영어 * 5
End Sub

 

Private Sub cmd등록_Click()
    기준행위치 = [b3].Row
    기준범위행수 = [b3].CurrentRegion.Rows.Count
    입력행 = 기준행위치 + 기준범위행수
    Cells(입력행, 2) = 입력행 - 3 & txt이름
    Cells(입력행, 3) = txt국어
    Cells(입력행, 4) = txt영어
    Cells(입력행, 5) = txt수학
    Cells(입력행, 6) = Format((Val(txt국어) + Val(txt영어) + Val((txt수학)) / 3, "0.00")

 

-> 빨간색 부분 아래와 같이 변경 하세요.

 

Private Sub cmd등록_Click()
    기준행위치 = [b3].Row
    기준범위행수 = [b3].CurrentRegion.Rows.Count
    입력행 = 기준행위치 + 기준범위행수
    Cells(입력행, 2) = 입력행 - 3 & txt이름
    Cells(입력행, 3) = txt국어
    Cells(입력행, 4) = txt영어
    Cells(입력행, 5) = txt수학
    Cells(입력행, 6) = Format((Val(txt국어) + Val(txt영어) + Val(txt수학)) / 3, "0.00")


좋은 하루 되세요.

 

  • 관리자
    2019-12-16 14:06:56

    Private Sub cmd성별_Click()
        If chk성별 = True Then
            cmd성별.Caption = "남학생"
        Else
            cmd성별.Caption = "여학생"
    End Sub

     

    -> 위의 cmd성별을 아래와 같이 변경 하세요.

     

    Private Sub chk성별_Click()
        If chk성별 = True Then
            cmd성별.Caption = "남학생"
        Else
            cmd성별.Caption = "여학생"

     

    End If                  <- 추가하셔야 합니다.
    End Sub

     

     


    Private Sub txt국어_Change()
        txt국어 = spin국어 * 5
    End Sub

    Private Sub txt수학_Change()
        txt영어 = spin영어 * 5
    End Sub

    Private Sub txt영어_Change()
        txt수학 = spin수학 * 5
    End Sub

     

    -> 위의 빨간색 txt 부분을 spin 으로 변경 하세요.

     

    Private Sub spin국어_Change()
        txt국어 = spin국어 * 5
    End Sub

    Private Sub spin수학_Change()
        txt수학 = spin수학 * 5
    End Sub

    Private Sub spin영어_Change()
        txt영어 = spin영어 * 5
    End Sub

     

    Private Sub cmd등록_Click()
        기준행위치 = [b3].Row
        기준범위행수 = [b3].CurrentRegion.Rows.Count
        입력행 = 기준행위치 + 기준범위행수
        Cells(입력행, 2) = 입력행 - 3 & txt이름
        Cells(입력행, 3) = txt국어
        Cells(입력행, 4) = txt영어
        Cells(입력행, 5) = txt수학
        Cells(입력행, 6) = Format((Val(txt국어) + Val(txt영어) + Val((txt수학)) / 3, "0.00")

     

    -> 빨간색 부분 아래와 같이 변경 하세요.

     

    Private Sub cmd등록_Click()
        기준행위치 = [b3].Row
        기준범위행수 = [b3].CurrentRegion.Rows.Count
        입력행 = 기준행위치 + 기준범위행수
        Cells(입력행, 2) = 입력행 - 3 & txt이름
        Cells(입력행, 3) = txt국어
        Cells(입력행, 4) = txt영어
        Cells(입력행, 5) = txt수학
        Cells(입력행, 6) = Format((Val(txt국어) + Val(txt영어) + Val(txt수학)) / 3, "0.00")


    좋은 하루 되세요.

     

· 5MB 이하의 zip, 문서, 이미지 파일만 가능합니다.
· 폭언, 욕설, 비방 등은 관리자에 의해 경고없이 삭제됩니다.