Reading text file in macro

Giganews Newsgroups
Subject: Reading text file in macro
Posted by:  Helpful person (rrll…@yahoo.com)
Date: Mon, 14 Jul 2008

I wish to read data from a text file from within a Visual Basic for
Applications macro that is attached to a command button in my
spreadsheet.  From the user's point of view it should look like this.

1. User clicks the button
2. In some manner the user inputs the file name.  Ideally this should
be using the windows API file open call, however, I don't think this
is available through VBA
3. The macro opens the file and reads data.
4. macro closes file.

Any help will be greatly appreciated.

Replies