Private Sub cmd검색_Click()
참조행 = cmb가입자명.ListIndex + 4
Cells(참조행, 3) = txt상품종류
Cells(참조행, 4) = txt지점명
Cells(참조행, 5) = txt성별
Cells(참조행, 6) = txt가입일
Cells(참조행, 7) = txt난입시점
Format(Cells(참조행, 8), "0.0%") = txt연이율.Value
Format(Cells(참조행, 9), "#,####") = txt월불입액.Value
End Sub
로 입력하셨는데 이 코드는 검색하는 코드가 아닙니다.
셀에 txt에 입력된 값을 입력하는 코드 입니다.
Private Sub cmd검색_Click()
참조행 = cmb가입자명.ListIndex + 4
txt상품종류.Value = Cells(참조행, 3)
txt지점명.Value = Cells(참조행, 4)
txt성별.Value = Cells(참조행, 5)
txt가입일.Value = Cells(참조행, 6)
txt납입시점.Value = Cells(참조행, 7)
txt연이율.Value = Format(Cells(참조행, 8), "0.0%")
txt월불입액.Value = Format(Cells(참조행, 9), "#,###")
End Sub
-
관리자2022-07-14 22:36:45
Private Sub cmd검색_Click()
참조행 = cmb가입자명.ListIndex + 4
Cells(참조행, 3) = txt상품종류
Cells(참조행, 4) = txt지점명
Cells(참조행, 5) = txt성별
Cells(참조행, 6) = txt가입일
Cells(참조행, 7) = txt난입시점
Format(Cells(참조행, 8), "0.0%") = txt연이율.Value
Format(Cells(참조행, 9), "#,####") = txt월불입액.Value
End Sub
로 입력하셨는데 이 코드는 검색하는 코드가 아닙니다.
셀에 txt에 입력된 값을 입력하는 코드 입니다.
Private Sub cmd검색_Click()
참조행 = cmb가입자명.ListIndex + 4
txt상품종류.Value = Cells(참조행, 3)
txt지점명.Value = Cells(참조행, 4)
txt성별.Value = Cells(참조행, 5)
txt가입일.Value = Cells(참조행, 6)
txt납입시점.Value = Cells(참조행, 7)
txt연이율.Value = Format(Cells(참조행, 8), "0.0%")
txt월불입액.Value = Format(Cells(참조행, 9), "#,###")
End Sub
와 같이 txt상품종류 컨트롤에 셀이 입력될 수 있도록 코드를 작성해 보세요.좋은 하루 되세요.