Open Test file with VBA with a changing file number
I assume that there is only one file in the directory that starts with
ni_wa_subinv_trans_ If that is the case you can use the Dir function similar
to you would in DOS.
Dir "C:\ni_wa_subinv_trans_*.txt"
this will return the full file name and you can then open the file...
HTH
"Michael from Austin" wrote:
I am trying to get VBA to open a text file called ni_wa_subinv_trans_XXXXXXX
and format in the Import wizard. The "ni_wa_subinv_trans_" will always be the
same , the "XXXXXX" will always be different. What can I do?
--
Regards,
Michael
|