PDA

View Full Version : FUNCRES.XLAM? Why is this file in my VB Editor?



doctortt
05-04-2011, 12:07 PM
I don't understand what this is, and I don't know how to remove it. Can someone tell me what this file is??

Thanks

Bob Phillips
05-04-2011, 02:16 PM
It is there to support the Analysis toolpak in Excel 2007. In previous versions, ATP was an addin, but in 2007, most of the functions are built in. Data Analysis is not, and this file creates a group called Analysis on the Data tab, which calls this code



'Entry point for RibbonX button click
Sub ShowATPDialog(control As IRibbonControl)
Application.Run ("fDialog")
End Sub


If you lopok at the file's XML, you will see



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" xmlns:excelAddin="http://schemas.microsoft.com/office/2006/excel/addins">
<ribbon>
<tabs>
<tab idMso="TabData">
<group idQ="excelAddin:groupExcelAddins" label="Analysis" insertAfterMso="GroupOutline">
<button id="btnATPDialog" insertBeforeQ="excelAddin:spacer" getLabel="funcres.xlam!GetATPLabel" image="rId1" onAction="funcres.xlam!ShowATPDialog" size="normal" screentip="Data Analysis Tools" supertip="Tools for financial and scientific data analysis."/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>

As you can see, as well as calling the ShowATPDialog callback, it calls the GetATPLabel callback to assign a label, which it gets from a worksheet in the addin file



'Callback for RibbonX button label
Sub GetATPLabel(control As IRibbonControl, ByRef label)
label = ThisWorkbook.Sheets("RES").Range("A10").Value
End Sub

I would leave it alone, it comes with Excel.