shaji_am
asked on
Reading a textfile in another system
Hi,
I am working in a VB project.I am using two systems - A & B - in the same network.I want to open a textfile in system B from an appliction running in system A.In system A I have only the IP address of system B.ie, using this IP I want to read the textfile in a folder in system B.
Any solution??????
Regards
Shaji_am
I am working in a VB project.I am using two systems - A & B - in the same network.I want to open a textfile in system B from an appliction running in system A.In system A I have only the IP address of system B.ie, using this IP I want to read the textfile in a folder in system B.
Any solution??????
Regards
Shaji_am
You could use the FileSystemObject to read the file.
Dim objFileSys As Object
Dim objFile As Object
Set objFileSys = CreateObject("Scripting.Fi leSystemOb ject")
Set objFile = objFileSys.openTextFile("\ \173.23.37 .3\MyTest\ test.txt", 1)
s = objFile.readall
Debug.Print s
Set objFileSys = Nothing
Set objFile = Nothing
Dim objFileSys As Object
Dim objFile As Object
Set objFileSys = CreateObject("Scripting.Fi
Set objFile = objFileSys.openTextFile("\
s = objFile.readall
Debug.Print s
Set objFileSys = Nothing
Set objFile = Nothing
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I somehow think you chose the wrong comment!
I hate this sort of things.
It alright, Tim and I have solved this matter, just wanted the rest of you know. Stuff happeans.
Thanks all,
ComTech
CS Admin @ EE
Thanks all,
ComTech
CS Admin @ EE
Thanks.
Open "\\127.0.0.1\sharename\tex
Here you can either use the computer name if known or the IP address instead. You need to be able to access the file/folder and have the necessary permissions to read this file but other than that it is straightforward.