To refresh all add-ins in Excel and ensure that all functions from add-ins run, use the following VBA code:
Set cmd = Application.CommandBars("Cell").Controls("Refresh All")
cmd.Execute
This code will execute the "Refresh All" command, which is available in the "Cell" tab of the Ribbon. This command will refresh all add-ins that are currently loaded in Excel, ensuring that any changes to the add-ins are applied. It is important to note that this code may not work with all add-ins, as some add-ins may have their own specific refresh mechanisms.
If you are having issues with the above code, you can try the following alternative code:
Application.CommandBars("Cell").Controls("Refresh All").Execute
This code should also refresh all add-ins in Excel. If you are still having issues, you can try closing and reopening the Excel file, or you can try disabling and then re-enabling the add-ins in the "Add-Ins" section of the Excel Options dialog box.