Very simple Delete Button help!!!!!

M

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?
 
M

Marc

Marc said:
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.
 
R

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!

--
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top