The following code will stop a process, provided you know the process name (usually the programme name followed by .exe) :
Public Function StopMyProcess(strTerminateThis As String)
On Error Resume Next
Dim objWMIcimv2 As Object
Dim objProcess As Object
Dim objList As Object
Dim intError As Integer
Set objWMIcimv2 = GetObject("winmgmts:" _
Set objList = objWMIcimv2.ExecQuery _
("select * from win32_process where name='" & strTerminateThis & "'")
If objList.Count = 0 Then
'The process isn't running
MsgBox "The process isn't running."
'The process is running
For Each objProcess In objList
'Terminate the process and all of its threads.
intError = objProcess.Terminate
If intError <> 0 Then
'Return value is 0 for success. Any other number is an error.
MsgBox "There was an error closing this process."
MsgBox "Process terminated ok."
Set objProcess = Nothing
Set objWMIcimv2 = Nothing
Set objList = Nothing
Call this code by passing the process name into the function like so:
I only used firefox as an example. Change the firefox part to the name of your DSL programme that you want to close. I can't tell you which process to close because I don't know how you connect to the internet - there are many many ways of doing that. If you open your task manager and can identify which is the DSL connection process, then that is the name you want to pass into the function.
Also remove any of the message boxes that you don't want to see, they were only included for de-bugging / feedback purposes.