Bạn test thử code này xem sao nhéchào các anh chị
em muốn xóa đi dữ liệu tùy chọn từ listbox và khi xóa đi thì dữ liệu trên file excel sẽ tự động xóa luôn
vậy nhờ các anh chị viết giúp em cái code
cám ơn
hay quá code ngắn mà dùng ok luôn cám ơn bạn nhiều nhé, mình mò từ sáng đến giờ không ra luôn.Bạn test thử code này xem sao nhé
[GPECODE=vb]Private Sub CommandButton1_Click()
With Me.ListBox1
Range(ThisWorkbook.Names("listbox").RefersTo).Cells(.ListIndex + 1, 1).EntireRow.Delete
End With
End Sub[/GPECODE]
Bạn test thử code này xem sao nhé
[GPECODE=vb]Private Sub CommandButton1_Click()
With Me.ListBox1
Range(ThisWorkbook.Names("listbox").RefersTo).Cells(.ListIndex + 1, 1).EntireRow.Delete
End With
End Sub[/GPECODE]