Private Sub cmd입력_Click()
i = [a4].Row + [a4].CurrentRegion.Rows.Count
Cells(i, 1) = txt고객명
If opt고급 = True Then
Cells(i, 2) = "고급"
If opt실버 = True Then
Cells(i, 2) = "실버"
If opt일반 = True Then
Cells(i, 2) = "일반"
End If
Cells(i, 3) = txt매출금액
Cells(i, 4) = lst결제방식
If lst결제방식 = "현금" Then
Cells(i, 5) = txt매출금액 * 0.1
If lst결제방식 = "카드" Then
Cells(i, 5) = txt매출금액 * 0.05
If lst결제방식 = "포인트" Then
Cells(i, 5) = txt매출금액 * 0
End If
End Sub
이렇게 입력하면 왜 실행이 안되는 건가요??
안녕하세요.
빨강색 표시한 부분을 수정하세요.
Private Sub cmd입력_Click()
i = [a4].Row + [a4].CurrentRegion.Rows.Count
Cells(i, 1) = txt고객명
If opt고급 = True Then
Cells(i, 2) = "고급"
ElseIf opt실버 = True Then
Cells(i, 2) = "실버"
ElseIf opt일반 = True Then
Cells(i, 2) = "일반"
End If
Cells(i, 3) = txt매출금액
Cells(i, 4) = lst결제방식
If lst결제방식 = "현금" Then
Cells(i, 5) = txt매출금액 * 0.1
ElseIf lst결제방식 = "카드" Then
Cells(i, 5) = txt매출금액 * 0.05
ElseIf lst결제방식 = "포인트" Then
Cells(i, 5) = txt매출금액 * 0
End If
End Sub
즐거운 하루 되세요.
-
*2017-01-16 11:12:57
안녕하세요.
빨강색 표시한 부분을 수정하세요.
Private Sub cmd입력_Click()
i = [a4].Row + [a4].CurrentRegion.Rows.CountCells(i, 1) = txt고객명
If opt고급 = True Then
Cells(i, 2) = "고급"
ElseIf opt실버 = True Then
Cells(i, 2) = "실버"
ElseIf opt일반 = True Then
Cells(i, 2) = "일반"
End IfCells(i, 3) = txt매출금액
Cells(i, 4) = lst결제방식If lst결제방식 = "현금" Then
Cells(i, 5) = txt매출금액 * 0.1
ElseIf lst결제방식 = "카드" Then
Cells(i, 5) = txt매출금액 * 0.05
ElseIf lst결제방식 = "포인트" Then
Cells(i, 5) = txt매출금액 * 0
End IfEnd Sub
즐거운 하루 되세요.