09-09-2009, 07:48 PM
Hi,
I have a file from which I have to read. I have this file at C:\D & S\Users\...\XYZ.txt
I want this path to be assigned to an arugument "File_path" and I have to use "File_path" several times.
I have gone through FileSystemObject but there all the examples are Creating a file and then reading from it but here I already have a file that I have to read from..
I am trying to use this statement -
Please guide me through as to how can I assign the file to "File_path"
Thank You.
I have a file from which I have to read. I have this file at C:\D & S\Users\...\XYZ.txt
I want this path to be assigned to an arugument "File_path" and I have to use "File_path" several times.
I have gone through FileSystemObject but there all the examples are Creating a file and then reading from it but here I already have a file that I have to read from..
I am trying to use this statement -
Code:
Set MyFile = CreateObject("scripting.FileSystemObject").OpenTextFile(file_path, ForReading)
Please guide me through as to how can I assign the file to "File_path"
Thank You.