Hi, i always encounter error whenver i delete last entry on the excel using the selected indx on listbox
i have a listbox SBL_list.List with items coming form Worksheet SBL_T2K ( 9 columns)
i need to delete the selected entire row on the listbox from the excel sheet.
no error encountered when deleting other rows beside the last row
i have a listbox SBL_list.List with items coming form Worksheet SBL_T2K ( 9 columns)
i need to delete the selected entire row on the listbox from the excel sheet.
no error encountered when deleting other rows beside the last row
VBA Code:
Worksheets("SBL_T2K").Select
For j = Range("A" & Rows.Count).End(xlUp).Row To 1 Step -1
If Cells(j, 1) = SBL_list.List(SBL_list.ListIndex) Then
Rows(j).Delete
End If
Next j
Last edited by a moderator: