Where is my button that I add to the QAT of my workbook
To reproduce the problem on a machine with Excel 2007 with SP2
installed follow the steps below.
Note: It is working Ok for me on a machine with no SP and also working OK in Excel 2010.
Open a new workbook and save it as a xlsm workbook
Press Alt F11 to open the VBA editor
On the menu bar use Insert module
Copy paste this macro in this module
Sub test()
MsgBox ""
End Sub
Alt q to close the VBA editor
Right click on the QAT(Quick Access Toolbar) and choose Customize QAT
In the "Choose Commands from" dropdown choose "Macros"
In the "Customize Quick Access Toolbar" dropdown choose "For workbook name"
Add the "test macro to the QAT
If you want you can use the Modify button to choose another icon
Press OK
You see the button now in the QAT and if you click on it you see the msgbox
Now Save the file and close it.
When you reopen the file the button is gone.
How do I fix this ?
When you add a button to your workbook It will save the QAT setup in the “userCustomization”
folder in a file named “customUI.xml”.
Note: this folder will not exist if you have not customized the QAT for this workbook.
If you open the file with Notepad or your xml editor you see that it add this line in the RibbonX
<mso:button idQ="doc:C:_Users_Ron_Desktop_OneWorkbookQAT.xlsm_test_1" visible="true"
label="test" onAction="C:\Users\Ron\Desktop\OneWorkbookQAT.xlsm!test" imageMso="HappyFace"/>
The problem is that It have add the path/file name in the RibbonX.
If you remove the path/file name like this the button will show up again
<mso:button idQ="doc:test_1" visible="true"
label="test" onAction="test" imageMso="HappyFace"/>
How do I edit the RibbonX ?
Excel 2007 files are really zip files so we change the extension of the xlsm file to zip.
After you change the extension to zip of the Excel file and open the zip file you see this.

It will save the QAT setup in the “userCustomization” folder in a file named “customUI.xml”
Note: this folder will not exist if you have not customized the QAT for this workbook.
Drag and drop this file out of the zip file on your desktop and open it in Notepad or another
xml editor and make the changes described above.
Then save and close the file and drag and drop it back into the zip file and say YES to replace
the file. Now close the zip file and change the extension back to xlsm and open the Excel file to test.
Tip:
Use the free zip program 7-Zip
Why ? : Much easier, because you not have to change the extension and can edit the file in the zip.
http://www.7-zip.org/
After you install 7-Zip you can do this.
1: Right click on your workbook icon on your desktop
2: Choose 7-Zip > Open archive
3: Right click on the file named “customUI.xml” in the “userCustomization” folder and choose "Edit"
Or select the file and press F4
4: Edit the file and save and close the “customUI.xml“ file
5: Say YES to update the archive
Note: It is working Ok for me on a machine with no SP and also working OK in Excel 2010.
Open a new workbook and save it as a xlsm workbook
Press Alt F11 to open the VBA editor
On the menu bar use Insert module
Copy paste this macro in this module
Sub test()
MsgBox ""
End Sub
Alt q to close the VBA editor
Right click on the QAT(Quick Access Toolbar) and choose Customize QAT
In the "Choose Commands from" dropdown choose "Macros"
In the "Customize Quick Access Toolbar" dropdown choose "For workbook name"
Add the "test macro to the QAT
If you want you can use the Modify button to choose another icon
Press OK
You see the button now in the QAT and if you click on it you see the msgbox
Now Save the file and close it.
When you reopen the file the button is gone.
How do I fix this ?
When you add a button to your workbook It will save the QAT setup in the “userCustomization”
folder in a file named “customUI.xml”.
Note: this folder will not exist if you have not customized the QAT for this workbook.
If you open the file with Notepad or your xml editor you see that it add this line in the RibbonX
<mso:button idQ="doc:C:_Users_Ron_Desktop_OneWorkbookQAT.xlsm_test_1" visible="true"
label="test" onAction="C:\Users\Ron\Desktop\OneWorkbookQAT.xlsm!test" imageMso="HappyFace"/>
The problem is that It have add the path/file name in the RibbonX.
If you remove the path/file name like this the button will show up again
<mso:button idQ="doc:test_1" visible="true"
label="test" onAction="test" imageMso="HappyFace"/>
How do I edit the RibbonX ?
Excel 2007 files are really zip files so we change the extension of the xlsm file to zip.
After you change the extension to zip of the Excel file and open the zip file you see this.

It will save the QAT setup in the “userCustomization” folder in a file named “customUI.xml”
Note: this folder will not exist if you have not customized the QAT for this workbook.
Drag and drop this file out of the zip file on your desktop and open it in Notepad or another
xml editor and make the changes described above.
Then save and close the file and drag and drop it back into the zip file and say YES to replace
the file. Now close the zip file and change the extension back to xlsm and open the Excel file to test.
Tip:
Use the free zip program 7-Zip
Why ? : Much easier, because you not have to change the extension and can edit the file in the zip.
http://www.7-zip.org/
After you install 7-Zip you can do this.
1: Right click on your workbook icon on your desktop
2: Choose 7-Zip > Open archive
3: Right click on the file named “customUI.xml” in the “userCustomization” folder and choose "Edit"
Or select the file and press F4
4: Edit the file and save and close the “customUI.xml“ file
5: Say YES to update the archive