Need to clear just the cell and not the entire row. Here is the code that needs changing.
[VBA] With ThisWorkbook.Sheets("Holidays")
.Rows.EntireRow(i + 1).ClearContents[/VBA]
Need to clear just the cell and not the entire row. Here is the code that needs changing.
[VBA] With ThisWorkbook.Sheets("Holidays")
.Rows.EntireRow(i + 1).ClearContents[/VBA]
Try:
With ThisWorkbook.Sheets("Holidays") .Cells(i + 1, "C").ClearContents End With
Didn't work but thanks for the try, I'll post all the code maybe that will help
[VBA]Private Sub CommandButton_Remove_Click()
Dim i As Long
'change listbox name and sheet location to yours
i = ListBox_Items.ListIndex + 1
With ThisWorkbook.Sheets("Holidays")
.Rows.EntireRow(i + 1).ClearContents
End With
populateBox
End Sub[/VBA]
Okay, this may be a dopey question, but just to clarify, you cahnged the column letter as needed, right?
Cells(i + 1, "C").ClearContents
GTO, that wasn't a dopey question. I changed the column letter and it works. So I thank you for asking the dopey question.
You bet 'Taz', always nice when it works out so quick
(BTW, Warner Bros. rules! That stupid mouse can go jump!)