Click to See Complete Forum and Search --> : Accessing Network Shared Folders


Kongming
February 11th, 2000, 06:33 AM
I am new in VB, and trying to learn... i have difficulty in writing a file residing on a network shared folder. I used:

Open "\\org3\org\test.dat" For Random As #1 Len = Len(MyRecord)

I figure the problem is that the folder is password protected... and although I know the password for full network access, i do not know how to parse this password through VB. It will be no problem if i first logon into the shared drive before executing my VB code... but that is not what i want.

Pls Help...

Lothar Haensler
February 11th, 2000, 06:43 AM
you can programmatically connect to a share specifying username and password by using the WNetAddConnection2 api.
Then you can access your file (using a drive letter).