View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default Delete/Remove Button

Hi,

Try this

Sub Button1_Click()
Dim x
x = Application.Caller
ActiveSheet.Shapes(x).Select
Selection.Cut
End Sub

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Jwil" wrote:

Hi,

Thank you for the replies. Maybe I wasn't as clear with my question.
I need to remove the button within the Macro.
So the scenario goes like this.:
The user hits the button and the macro runs.
After the macro the button goes away so the user doesn't
hit the button again. and so that the worksheet can be saved without
a button in it.

Thanks

"FSt1" wrote:

hi
you need to be in design mode to do that.

regards
FSt1

"JMay" wrote:

Right Click the Button - from the short-Cut menu select "Cut"; Done


"Jwil" wrote:

I want to call or assign a macro using a command button or a button from the
forms toolbar. How do I remove or delete the button using VBA after the
macro it called is done? It doesn't really matter which button I have to use.

Thanks