How can I load a VBA library reference and use it in the same procedure?
问题 I have a VBA script for Excel that adds a small procedure in the active workbook. The final version will add a procedure that auto-saves backup copies of the workbook. The code requires the Microsoft Visual Basic for Applications Extensibility 5.3 library which I can add manually, but I'm interested in having a single script that can add that library into Excel and then use it. Here's the code that adds the library reference to Excel. It works. On Error Resume Next ' If library already