The following function will delete entry.
Declare Function RasDeleteEntry _ Lib "rasapi32.dll" Alias "RasDeleteEntryA" _ (ByVal lpszPhonebook As String, _ ByVal lpszEntry As String) As Long
If successful it will return 0.
The following is an example:
Dim rtn As Long rtn = RasDeleteEntry(vbNullString, "My Connection") If rtn <> 0 Then MsgBox VBRASErrorHandler(rtn) End If
See Also: Contents, Introduction, RasEnumEntries, RasErrorHandler.