Redirecting
Option Explicit
Sub Auto_Open()
Dim TextLine As String
Open "C:\myfile.txt" For Input As #1
Line Input #1, TextLine
Close #1
Workbooks.Open Filename:=TextLine
ThisWorkbook.Close savechanges:=False
End Sub
You should add some validity checks to it.
C:\myfile.txt
is a plain old text file that contains one line of data--the full name of the
..csv file.
tishoo wrote:
"Dave Peterson" wrote in message
...
You could have the macro reads a text file to get the name and then open
that
file.
that could work. Any idea how I might do that?
--
Dave Peterson
|