thanhtam348
Thành viên thường trực
- Tham gia
- 9/3/07
- Bài viết
- 288
- Được thích
- 62
Tôi có lấy trên GPE code về chỉnh sửa để đưa vào Form update dử liệu, nhưng khi dùng thì bị lổi, AC và các bạn xem sửa dùm.
Mã:
Private Sub ListBox1_Change()
[COLOR=red]Me.TextBox2.Value = Me.ListBox1.Column(6) [COLOR=black]hiện tại xảy ra lổi ở đây.[/COLOR]
[/COLOR]Me.TextBox3.Value = Me.ListBox1.Column(7)
Me.TextBox4.Value = Me.ListBox1.Column(8)
Me.TextBox5.Value = Me.ListBox1.Column(10)
Me.TextBox6.Value = Me.ListBox1.Column(11)
Me.TextBox7.Value = Me.ListBox1.Column(12)
End Sub
Mã:
Private Sub CommandButton1_Click()
Dim dg
dg = Me.ListBox1.ListIndex + 1
Me.ListBox1.RowSource = ""
With Sheet11.Range("SuaDL")
.Cells(dg, 9) = Me.TextBox2.Text
.Cells(dg, 10) = Me.TextBox3.Text
.Cells(dg, 11) = Me.TextBox4.Text
.Cells(dg, 13) = Me.TextBox5.Text
.Cells(dg, 14) = Me.TextBox6.Text
.Cells(dg, 15) = Me.TextBox7.Text
End With
ResetColors
Unload Me
End Sub