Hello,
It seems that you are changing Short Cut of built-in button. I guess it throws the error "Error HRESULT E_FAIL has been returned from a call to a COM component." when setting ShortcutText property. As far as I know, we cannot modify the built-in button's short cut. Here are some threads about Excel short cut:
CommandBarButton's Shortcut and Enabled/Disabled. If I have mistaken this scenario, please point me out.
Best regards,
Bessie
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.