Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make a button disappear
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make a button disappear
Try this
ActiveSheet.Shapes("yourbutton").Visible = False Or ActiveSheet.Shapes("yourbutton").Delete -- Regards Ron de Bruin http://www.rondebruin.nl "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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make a button disappear
That worked, have never heard of the Shapes command before though!!
Thanks ;-) "Tom Ogilvy" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why does the 'data' button disappear... | Charts and Charting in Excel | |||
Insert Options button doesn't disappear | Excel Discussion (Misc queries) | |||
How to make excel disappear! | Excel Discussion (Misc queries) | |||
How do I make it disappear? | New Users to Excel | |||
how to make dropdown arrow disappear in vba | Excel Worksheet Functions |