Alternative to API calls
you can use the shell command to produce a file of network information and then re use shell to map a drive.
batch commands that you need are
net view /?
and
net use /?
Use of if exists in batch files is quite usefull to check if files do exist or not.
I've never created a table this but
Notice in your line
tbl.Columns.Append "Column 1", adVarWChar, 40
you seem to have a space in the column name, which access doesn't allow
also you can't have duplicate column names in access which could be why appending the counter to the field...
Extra Note on using the shell command is after executing the shell command VB continues to execute statements so doesn't wait to see if the shell process finished or not.
If you need to wait for the process to finish then two options are to have a do loop which just keeps looping until a...
in line with Merlijn function its also quite handy to have a isFileWritable function as well.
Just open the file for append if the file isn't writable the an error will be raised and so the function returns false.
There is also some way to get environment variables in VB (cant remember what it...
This may help but to avoid using a windows program try the following, cant remember 98 but XP provides lots of good command line options for most commands.
Single bas file in the project.
Sub main is something like the following
Sub Main
Dim S as String
while s <> ""
s =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.