ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CommandButton (https://www.excelbanter.com/excel-programming/295125-re-commandbutton.html)

chris[_12_]

CommandButton
 
try this for now. go ahead and delete the 1st button and rename CommandButton2 to CommandButton1 using the properties window( Name not Caption!)
if you get an ambiguous name error respond back and i'll give you some code to locate and delete the CommandButton1

rwebster3

CommandButton
 
Chris

I tried renaming the button and got the error you said I would get. At this point I took the long way around. I had noticed that the button name was still in the Object Box of the VB edit window, even though the button and code were removed. I then made a copy of the sheet. On the copied sheet, the button declaration was gone. I then deleted the old sheet completely, renamed the new sheet, and created the button from scratch. Works great now

But, I'd still like to have the code that locates and deletes stuff like this. It could come in handy in the future

Thanks

Rick W.


All times are GMT +1. The time now is 08:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com