Using VBA
Printable View
Using VBA
Pseudo code:
get an instance of Excel, if it fails create an instance
open a workbook or create one
set an instance to the sheet you want to write on
open the text file for reading
write your text to the cell(s) you want.
tip:
- search for getobject/createobject and Excel to accomplish the first line of pseudo code :)
- search for freefile to see examples of opening a textfile (in a good way)
Moved from ClassicVb.
If you are just wanting to Import the text file into the worksheet, you can just record a macro to get the basic syntax used, then clean the code up after it has done most of the work.