Private Sub CmBAppcept_Click()
Dim i As Long, FName As String
With ListBResult
If Cells(5, ActiveCell.Column) = "AnhCD" Then Cells(ActiveCell.Row, ActiveCell.Column) = .List(i, 1)
If Cells(5, ActiveCell.Column) = "LytrinhBD" Then Cells(ActiveCell.Row, ActiveCell.Column - 1) = .List(i, 1)
If Cells(5, ActiveCell.Column) = "LytrinhKT" Then Cells(ActiveCell.Row, ActiveCell.Column - 2) = .List(i, 1)
If Cells(5, ActiveCell.Column) = "DaoDap" Then Cells(ActiveCell.Row, ActiveCell.Column - 3) = .List(i, 1)
If Cells(5, ActiveCell.Column) = "PhanLop" Then Cells(ActiveCell.Row, ActiveCell.Column - 4) = .List(i, 1)
If Cells(5, ActiveCell.Column) = "DiemCD" Then Cells(ActiveCell.Row, ActiveCell.Column - 5) = .List(i, 1)
End With
With CbBoxBD
If Cells(5, ActiveCell.Column) = "AnhCD" Then Cells(ActiveCell.Row, ActiveCell.Column + 1) = .Value
If Cells(5, ActiveCell.Column) = "LyTrinhBD" Then Cells(ActiveCell.Row, ActiveCell.Column) = .List(.ListIndex, 1)
If Cells(5, ActiveCell.Column) = "LyTrinhKT" Then Cells(ActiveCell.Row, ActiveCell.Column - 1) = .Value
If Cells(5, ActiveCell.Column) = "DaoDap" Then Cells(ActiveCell.Row, ActiveCell.Column - 2) = .Value
If Cells(5, ActiveCell.Column) = "PhanLop" Then Cells(ActiveCell.Row, ActiveCell.Column - 3) = .Value
If Cells(5, ActiveCell.Column) = "DiemCD" Then Cells(ActiveCell.Row, ActiveCell.Column - 4) = .Value
End With
With CbBoxKT
If Cells(5, ActiveCell.Column) = "AnhCD" Then Cells(ActiveCell.Row, ActiveCell.Column + 2) = .Value
If Cells(5, ActiveCell.Column) = "LyTrinhBD" Then Cells(ActiveCell.Row, ActiveCell.Column + 1) = .Value
If Cells(5, ActiveCell.Column) = "LyTrinhKT" Then Cells(ActiveCell.Row, ActiveCell.Column) = .Value
If Cells(5, ActiveCell.Column) = "DaoDap" Then Cells(ActiveCell.Row, ActiveCell.Column - 1) = .Value
If Cells(5, ActiveCell.Column) = "PhanLop" Then Cells(ActiveCell.Row, ActiveCell.Column - 2) = .Value
If Cells(5, ActiveCell.Column) = "DiemCD" Then Cells(ActiveCell.Row, ActiveCell.Column - 3) = .Value
End With
With CbBoxPL
If Cells(5, ActiveCell.Column) = "AnhCD" Then Cells(ActiveCell.Row, ActiveCell.Column + 3) = .Value
If Cells(5, ActiveCell.Column) = "LyTrinhBD" Then Cells(ActiveCell.Row, ActiveCell.Column + 2) = .Value
If Cells(5, ActiveCell.Column) = "LyTrinhKT" Then Cells(ActiveCell.Row, ActiveCell.Column + 1) = .Value
If Cells(5, ActiveCell.Column) = "DaoDap" Then Cells(ActiveCell.Row, ActiveCell.Column) = .Value
If Cells(5, ActiveCell.Column) = "PhanLop" Then Cells(ActiveCell.Row, ActiveCell.Column - 1) = .Value
If Cells(5, ActiveCell.Column) = "DiemCD" Then Cells(ActiveCell.Row, ActiveCell.Column - 2) = .Value
End With
With TextBox1
If Cells(5, ActiveCell.Column) = "AnhCD" Then Cells(ActiveCell.Row, ActiveCell.Column + 4) = .Value
If Cells(5, ActiveCell.Column) = "LytrinhBD" Then Cells(ActiveCell.Row, ActiveCell.Column + 3) = .Value
If Cells(5, ActiveCell.Column) = "LytrinhKT" Then Cells(ActiveCell.Row, ActiveCell.Column + 2) = .Value
If Cells(5, ActiveCell.Column) = "DaoDap" Then Cells(ActiveCell.Row, ActiveCell.Column + 1) = .Value
If Cells(5, ActiveCell.Column) = "PhanLop" Then Cells(ActiveCell.Row, ActiveCell.Column) = .Value
If Cells(5, ActiveCell.Column) = "DiemCD" Then Cells(ActiveCell.Row, ActiveCell.Column - 1) = .Value
End With
With TextBox2
If Cells(5, ActiveCell.Column) = "AnhCD" Then Cells(ActiveCell.Row, ActiveCell.Column + 5) = .Value
If Cells(5, ActiveCell.Column) = "LytrinhBD" Then Cells(ActiveCell.Row, ActiveCell.Column + 4) = .Value
If Cells(5, ActiveCell.Column) = "LytrinhKT" Then Cells(ActiveCell.Row, ActiveCell.Column + 3) = .Value
If Cells(5, ActiveCell.Column) = "DaoDap" Then Cells(ActiveCell.Row, ActiveCell.Column + 2) = .Value
If Cells(5, ActiveCell.Column) = "PhanLop" Then Cells(ActiveCell.Row, ActiveCell.Column + 1) = .Value
If Cells(5, ActiveCell.Column) = "DiemCD" Then Cells(ActiveCell.Row, ActiveCell.Column) = .Value
End With
UF_PictureCD.Hide
End Sub