![add analysis toolpak excel 2017 add analysis toolpak excel 2017](https://i.stack.imgur.com/Q5I7J.png)
We register the add-in, start Excel, enable Analysis ToolPak as well as Analysis ToolPak – VBA (see the Add-ins dialog), restart Excel and get the crash: Faulting application name: EXCEL.EXE, version. On this machine, the faulting module’s version is 3.674. Restarting Excel shows that Excel thinks the VSTO add-in above is responsible for the crash: Excel suggests disabling it. 2046, time stamp: 0x5a06f6a8įaulting module name: KERNELBASE.dll, version: 9.15, time stamp: 0x2cd1ce3dįaulting application start time: 0x01d35ec00ed5ca65įaulting application path: C:\Program Files (x86)\Microsoft Office\root\Office16\excel.exeįaulting module path: C:\WINDOWS\System32\KERNELBASE.dll Event Viewer shows this info on that machine: Faulting application name: excel.exe, version. Nothing else is required to reproduce the crash. On this machine, the faulting module’s version is 9.15.
#Add analysis toolpak excel 2017 code
In both cases the crash occurs on the same code line: Application: EXCEL.EXEĭescription: The process was terminated due to an unhandled exception.Įxception Info: System.AccessViolationExceptionĪt ._t_BeginGroup(Boolean pvarfBeginGroup)Īt _Startup(Object sender, EventArgs e)Īt .OnStartup()Īt .EntryPoint.OnStartup()Īt .OnStartup()Īt ()Īt .FinishInitialization()Īt .(ExecutionPhases executionPhases)Īt .() We have at least two machines on which the code above crashes Excel 2016 build 8730.2046 32bit with somewhat different symptoms. Marshal.ReleaseComObject(cmdBars) cmdBars = null Marshal.ReleaseComObject(cmdBar) cmdBar = null Marshal.ReleaseComObject(cmdBarControls) cmdBarControls = null Marshal.ReleaseComObject(cmdButton) cmdButton = null Office.CommandBarButton cmdButton = cmdBarControls.Add(Type:, Id: 1, Temporary: true) as Office.CommandBarButton ĬmdButton.BeginGroup = false // <- this line crashes Excel Office.CommandBarControls cmdBarControls = cmdBar.Controls Private void ThisAddIn_Startup(object sender, System.EventArgs e) Consider a VSTO add-in creating a custom ComandBar button in the Cells context menu: