Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Import a Text File into Code

Import a Text File into Code

This page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.

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

  1. Open the module into which you want to insert text and position the entry point at the place where you want the text inserted.

  2. On the Insert menu, click File.

  3. The Insert File dialog box appears.

  4. Use the Insert File dialog box to select the file to import.

  5. Click OK.

Show:
© 2015 Microsoft