If You want to open an excel file use this:
Workbooks.Open file_name
text file in Excel:
Workbooks.OpenText file_name
for example:
Workbooks.OpenText filename:="DATA.TXT", _
dataType:=xlDelimited, tab:=True
if it is a text file and You want to read from it:
Open file_name For Input As #1
write to a file
Open file_name For Output As #1
Read the online help for open method to get more info
"pgoodale" wrote in message
...
Does anyone know the line of code to open a file? I have created a macro
and am programming in VBA. All I need is the code which opens up files.
Any help is really appreciated.
---
Message posted from http://www.ExcelForum.com/