![]() |
Delete a Commandbutton from another Workbook
Dear All,
What code do I use to reference and then delete a commandbutton that is embedded on a worksheet in workbook(B). The code has to go in a module in workbook(A). Any help greatly appreciated Jason |
Delete a Commandbutton from another Workbook
Hi jase
If the workbook is open you can use this for a control toolbox button Workbooks("OtherWorkbook.xls").Sheets("Sheet1").OL EObjects("TheButton").Delete -- Regards Ron de Bruin http://www.rondebruin.nl "jase" wrote in message oups.com... Dear All, What code do I use to reference and then delete a commandbutton that is embedded on a worksheet in workbook(B). The code has to go in a module in workbook(A). Any help greatly appreciated Jason |
Delete a Commandbutton from another Workbook
cheers Ron
|
Delete a Commandbutton from another Workbook
so the OLEObjects collaction comprises all things embedded in
worksheets? |
Delete a Commandbutton from another Workbook
Nope. For instance, you can add controls from the Forms toolbar or shapes from
the Drawing toolbar. These aren't OLEObjects. jase wrote: so the OLEObjects collaction comprises all things embedded in worksheets? -- Dave Peterson |
Delete a Commandbutton from another Workbook
to complement Dave's thought - all the items on the worksheet are in the
shapes collection. -- Regards, Tom Ogilvy "Dave Peterson" wrote in message ... Nope. For instance, you can add controls from the Forms toolbar or shapes from the Drawing toolbar. These aren't OLEObjects. jase wrote: so the OLEObjects collaction comprises all things embedded in worksheets? -- Dave Peterson |
All times are GMT +1. The time now is 05:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com