Thanks again Leith for thecode, but it doesn't seem to want to work correctly as expected.
At first I had...
...so when the form opens optInsert is checked by default and it works, but then I doubleclick again to delete the rows just added and it still adds rows, no delete. I changed the UserForm_Initialize to optDelete = True and the delete works no matter whether I choose the Insert or Delete.
I took the optInsert = True out of the UserForm_Initialize and no matter whether I choose the Insert or Delete nothing happens. I stepped through the code and sure enough both are false.
Also, if I select Cancel on the form it still runs the doubleclick event.
Bookmarks