Changing username in the Excel OfficeUI file RRS feed

  • Question

  • Hi

    I have made a custom ribbon with macros that i want to deploy to multiple users. However, when i tested it with another user, although the menu looked ok, i got an error message when running the macro. as it turned out my username is hardcoded into the excel officeUI file. Therefore the deployment only works with my account. Is there a way to deploy the officeUI or converting the UI file so it allows it to be pushed out to multiple users?


    Monday, May 7, 2018 1:21 PM

All replies

  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Excel features, I'll move your question to the MSDN forum for Excel

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.



    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Tuesday, May 8, 2018 6:23 AM
  • Hello Jens,

    I would suggest you you use a variant to get the local machine's username instead of hardcoding a username.

    For instance


    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Wednesday, May 9, 2018 7:19 AM