Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have had trouble with some code to remove the macro button from a worksheet (the spreadsheet is being reduced to bare values etc for distribution as a final report etc) By way of background, the workbook has been used by others so someone may have copied or reinstated the macro button - see below. I was using this code: ActiveWorkbook.Sheets("Income & Expenditure A1").Shapes("Button 3").Delete but I have recently got the runtime error "the item with the specified name was not found" I substituted this code and it seems to work OK ActiveWorkbook.Sheets("Income & Expenditure A1").Shapes(1).Delete My question is this: will this code ALWAYS delete the one macro button on the sheet (there are no other "shapes"). Many thanks Tim |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting a Command Button | Excel Discussion (Misc queries) | |||
Deleting a Command Button from my Spreadsheet | Excel Discussion (Misc queries) | |||
deleting values in a worksheet without deleting the formulas | Excel Worksheet Functions | |||
Deleting a button | Excel Programming | |||
Deleting Command Button | Excel Programming |