Excel CommandButton names changing

2019-09-12 06:17发布

问题:

I created an excel file with macros on ActiveX-CommandButtons. They worked well, when I just finished them. As soon as I opened the file again, the CommandButton-Names changed.


As example:

CommandButton1 changed to CommandButton2

CommandButton2 changed to CommandButton3 etc.


I didn't found anything in my reasearch, so is this an excel bug or just something that you can change in your preferences?

回答1:

Right click on CommandButton

Go to (click on) 'Format Text Effects'

Give the name to button, whichever you want.

Save it.

Close the workbook.

Open it back and check whether name changes

(No need to enable 'Design Mode')

It works for me. Hope it shall work for you too.

If it do not work then please let me know.

For more info: https://support.office.microsoft.com/en-in/article/Add-a-button-and-assign-a-macro-to-it-in-a-worksheet-d58edd7d-cb04-4964-bead-9c72c843a283?CorrelationId=345214f6-6d01-4b07-994b-b2e33159e694&ui=en-US&rs=en-IN&ad=IN