View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Make a button disappear

for a commandbutton
Activesheet.Shapes("CommandButton1").Delete

or

Activesheet.Shapes("CommandButton1").Visible = False

for a button from the forms toolbar

Activesheet.Buttons("Button 1").Delete

or

Activesheet.buttons("button 1").Visible = False


If you are going to use the button again, I would hide and unhide it rather
than adding a new button each time.

--
Regards,
Tom Ogilvy


"Aaron Howe" wrote in message
...
Is there a specific piece of code to remove a form/control button from a
worksheet? Have tried many things, none of them working! I don't mind if
it's just hidden actually, so long as it can't be seen by the end user

once
the code has run its course