Link to home
Start Free TrialLog in
Avatar of Jay Polo
Jay Polo

asked on

Get VPN or Internet Access as a MsgBox - Excel Macro Code

Help, does anyone know how to get the vpn or Internet access in excel macro code and show it as a msgbox? - Jay
Avatar of Qlemo
Qlemo
Flag of Germany image

I'm not clear what you want to achieve here. Could you elaborate more on what the purpose is exactly?
Avatar of Jay Polo
Jay Polo

ASKER

 Sub ShowMeDetails ()

MsgBox Environ("COMPUTERNAME")
MsgBox Environ("USERPROFILE")
MsgBox Environ("USERDOMAIN")

End Sub 

Open in new window


I need to show as a MsgBox where the user has logged to (see picture, sample MsgBox ("VPN"=group.net).User generated image
And what if connected with LAN, WiFi and VPN? What to choose to display? And what is the purpose - or, how does it matter at all?
And what if connected with LAN, WiFi and VPN? yes, if needed. All I need is to get where the user is connected (eg: group.net and would should as a MsgBox)

What to choose to display? just a MsgBox

And what is the purpose - or, how does it matter at all? we are checking how many users are using the VPN, connected at school, at home, or in the office.
Sub ShowMeDetails ()

MsgBox Environ("COMPUTERNAME")
MsgBox Environ("USERPROFILE")
MsgBox Environ("USERDOMAIN")
MsgBox ("VPN = Internet Access") 'I need this code to run my file

End Sub

Open in new window

SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
is this MS Excel VBA Macro?
No, it is a cmd.exe batch file (.cmd or .bat).
Aww. I appreciate your efforts. But I would need something Excel macro related language. :(
You know your way to output stuff results in "endless" message boxes popping up each with a single information? Not user-friendly ...
We certainly can provide code to generate the batch file, run it, and display the results from VBA, but I'm not sure you should want to do that ...
I'll try that one if it's ok? hopefully that would complete this file.
up :(
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Idea in ipconfig, parsing in vba