|
-
Feb 28th, 2009, 08:01 PM
#1
Thread Starter
Junior Member
[RESOLVED] Error Handling when mapping a drive -easy
Hi,
I'm looking at error handling for a drive mapping i'm doing. All i need is a two errors to be resolved...
If a drive doesn't map due to an Access denied failure or because the drive's already mapped?
Here's what i've got...
Private Sub cmdConnect_Click()
Dim objNetwork
Set objNetwork = CreateObject("WScript.Network")
strLocalDrive = "Z:"
strRemoteShare = "\\servername\share"
strUser = TxtUsername
strpassword = txtPassword
objNetwork.MapNetworkDrive strLocalDrive, strRemoteShare, False, strUser, strpassword
End Sub
All ideas welcome, i want to learn how to do this...
Thanks In Advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|