Automated Text Import in Excel with File Selection - The Easy Way - VBA

Add to Favorites
Author: | Edits: don

Full VBA/Macro Course

How to import a text or csv file into Excel using an automated macro and vba - this is the easier, yet robust, way to import text using a macro.

This tutorial teaches you how to import text using a macro with a file selection popup window that lets the uer choose the file to import and also using a predefined file name so that you can quickly import the file without having to choose it from the computer.

All code in this tutorial is commented and fully explained and I take you step-by-step through the process of building the import macro and showing you how to change it to meet your needs.

This tutorial combines many features, including:

  • GetOpenFilename()¬†
  • OpenText¬†
  • IF Statements in VBA
  • Copying values between workbooks in Excel.

 

Question? Ask it in our Excel Forum


Downloadable Files: Excel File 1, Excel File 2