versebta.blogg.se

Remove vba project excel 2003
Remove vba project excel 2003








In the highest version of Office that you have access to, set a reference to the desired library.Download the attached file and open up the VBE (Alt + F11).Save workbook before any other changes.Locate the project's "ThisWorkbook" module in the Project Explorer and double click it.Copy the Workbook_Open event from the window above.Right-click desired file on left (in bold).Press Ctrl + R to show the Project Explorer.In Excel press Alt + F11 to enter the VBE.Copy the References_RemoveMissing subroutine.VbCritical, "Unable To Remove Missing Reference" & "You will need to remove the reference manually.", _ MsgBox "A missing reference has been encountered!" _ 'Macro purpose: To remove missing references from the VBEįor i = To 1 Step -1 (This box is located in Tools|Options|Security|Macro Security|Trusted Publishers) In Office 2002 or later, the TRUST ACCESS TO VISUAL BASIC PROJECT box MUST be checked, or the code will not work. NOTE: It will generate an error if the code encounters a reference library that has never been registered (installed on that system) before.

remove vba project excel 2003

This code is best run as part of the Workbook_Open event, before any attempts are made to add new references via code. It's best use is for removing "Missing" references which have occured because the reference libraries have been "upgraded" by sending the file to a newer version of the program (say 2002), and then back to the original version again (say 97). This code can be used to remove a reference Library that is marked at "Missing" in the VBE References window. Remove Missing VBA Library References via code










Remove vba project excel 2003