Connect a VPN

Toolguy

New member
Local time
Yesterday, 20:50
Joined
Oct 11, 2009
Messages
8
Hi
What the best way to connect a vpn in access
the shell command doesn't seem to work with a shortcut on the desktop

Code:
Public Sub StartVPN()
Dim StartProcess
StartProcess = Shell("C:\Documents and Settings\User1\Desktop\New Folder\VPN Connection.lnk", 1)
End Sub

Cheers Toolguy
 
Last edited:
You feel like sharing the solution?
 
Yip no worries there. This is how i got around it
Create the VPN Connection on your computer and call it "Work VPN"

Create a batch files with note pad and the write this in....

rasdialer "Work VPN"

Save it and call it Connect.bat

Create another one and write this in

rasdialer "Work VPN" /D
Save and call it Disconnect.bat

Call the first file with a shell cmd to connect and call the other file to disconnect

code to connect the VPN with a Access Module
Code:
Public Sub StartVPN()
Dim StartProcess
StartProcess = Shell("C:\Documents and Settings\User1\Desktop\Connect.bat", vbHide)
End Sub

code to Disconnect the VPN with a Access Module

Code:
Public Sub StopVPN()
Dim StopProcess
StopProcess = Shell("C:\Documents and Settings\User1\Desktop\Disconnect.bat", vbHide)
End Sub

Hope this explanes the process. Working on a way to do the full connection inside Access with a module :D

Toolguy
 
Last edited:

Users who are viewing this thread

Back
Top Bottom