Can a Button Delete Itself?
Posted on 2004-11-20
I have a button that has been created on the fly, which when clicked, executes a
procedure (say UpdateContent) which changes the content of a database then
destroys the button itself, then recalls the procedure (say LoadPage)
that created the button in the first place. It works OK except that it
brings up an error message whenever the code is run (AFTER the destroy
and recall functions of LoadPage have been executed) when the
line-by-line handling returns back to UpdateContent for the final end.
This is presumably because the button that called the procedure no
longer exists. Is there any simple way around this?