RemoveItem doesn't work if the list is bound to the data.
Since you say it works, then you must not be bound to data.
With Me.ListBox1
idx = .ListIndex + 1
.RemoveItem .ListIndex
End With
With Worksheets("Data")
.Range("A1").Offset(idex,0).Entirerow.Delete
End With
Assumes the data starts in row1 of the sheet named data with a header row
--
Regards,
Tom Ogilvy
"Jennifer" <Jennifer@discussions.microsoft.com> wrote in message
news:0F8A4B01-5426-432D-965C-ED6D5CD31E2D@microsoft.com...
> I found this code in the archives but it doesn't delete the data from the
> database also. If the user accidentally makes a double entry i would like
> them to be able to delete it or void it out. What would you suggest? I
also
> have a few formulas in the database and when the data is erased it tends
to
> mess the formulas up. Have any ideas for that also. Thank you, Jennifer
> This is what i have so far.
> With Me.ListBox1
> .RemoveItem .ListIndex
> End With
>
> --
> Though daily learning, I LOVE EXCEL!
> Jennifer
Bookmarks