In Excel 97, how can I use a text file containing VBA code to create a code module in a workbook at run-time?
In Excel 97 VBA, code modules and other parts of a VBA project belong to the VBComponents collection of the VBProject object for a given workbook. Creating a new code module at run-time requires you to add a new item to the VBComponents collection. To access these objects, you first need to set a reference to the Visual Basic for Applications Extensions library in the project where the module creating code will go. To do this, activate that project in the VBE, choose Tools/References from the VBE menu and place a check mark beside the VBA Extensions object library.
Related Questions
- How can I protect an Excel file (and associated code) from unauthorized copying and/or create time limited functionality?
- What is the best way to transfer my data (from Excel, from SPSS, from a text file, etc.) into Stata?
- Previous Page How do I create a creditor matrix text (.txt) file using TopForm?