this simply tells me if i have a connection or not..
If I'm remote we use cisco Vpn to tunnel to our corporate netwrok.
So my solution for the previous question is workin fine:
Dim IsVPNConnected, sComputer, oWMIService, colItems, objItem
IsVPNConnected = False
sComputer = "."
Set oWMIService = GetObject("winmgmts:\\" _
& sComputer & "\root\CIMV2")
Set colItems = oWMIService.ExecQuery( _
"SELECT * FROM Win32_NetworkAdapterConfiguration", , 48)
For Each objItem In colItems
'Please check description of your VPN Connection by running command "ipconfig /all" on command-line.
If (InStr(objItem.Description, "AnyConnect")) Then
IsVPNConnected = objItem.IPEnabled
If (IsVPNConnected) Then
IsVPNConnected = MsgBox("I am Connected to VPN.")
IsVPNConnected = MsgBox("I am Not Connected to VPN.")
What I need: If at my corporate office and NOT remote. The connection is live either wireless or Hard wired..
So is the code different to check to see if i'm on coporate vpn automatically ?