I think what you are seeing is the event handler code that does not get deleted with the button or other object. If you check the declaration of the subroutine before you delete the button, you should see "Handles Button1.click" at the end of the line. After you delete the button, that piece of code will be removed, but the subroutine is still there.
So if you are no longer using that subroutine, you will have to manually delete it.