Home All Groups Group Topic Archive Search About

Very simple Delete Button help!!!!!

Author
25 Nov 2006 11:40 AM
Marc
I have a context menu on a button. I just need some code that will
delete the button when the context menu is clicked.

Any ideas?

Author
25 Nov 2006 11:43 AM
Marc
Marc wrote:
> I have a context menu on a button. I just need some code that will
> delete the button when the context menu is clicked.
>
> Any ideas?

I should add that i do not know the button name as it is created
dynamically.
Author
26 Nov 2006 11:32 PM
Ryan S. Thiele
Delete the button? you mean remove it from the control?

Contextmenu.controls.remove(buttonname)
-or
Contextmenu.control.removeat(indexofbutton)

Hope this helps.

this method workss in both VB 2k3 and 2k5.

--
Thiele Enterprises - The Power Is In Your Hands Now!

--
"Marc" <marc_cro***@hotmail.com> wrote in message
news:1164455008.113032.162510@j44g2000cwa.googlegroups.com...

Marc wrote:
> I have a context menu on a button. I just need some code that will
> delete the button when the context menu is clicked.
>
> Any ideas?

I should add that i do not know the button name as it is created
dynamically.