Import a text file into code
You can import a text file containing code into the current module and use it in your code.
To import a text file into a module
Open the module into which you want to insert text and position the entry point at the place where you want the text inserted.
On the Insert menu, choose File.
The Insert File dialog box appears.
Use the Insert File dialog box to select the file to import.
Click OK.
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.