M Marc Nov 25, 2006 #1 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 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 Nov 25, 2006 #2 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? Click to expand... I should add that i do not know the button name as it is created dynamically.
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? Click to expand... I should add that i do not know the button name as it is created dynamically.
R Ryan S. Thiele Nov 26, 2006 #3 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? Click to expand... I should add that i do not know the button name as it is created dynamically.
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? Click to expand... I should add that i do not know the button name as it is created dynamically.