Say I’m connected to test.server.com for my Internet access. Is there any way to have that string returned using VBA?
To expand, at your requests (sorry, networking is something I know very little about):
The following refers to Windows 7 Enterprise: If you were to navigate to the ‘Network and Sharing Center’ within the Control Panel, this would be the name of the ‘Domain network’. Alternatively, clicking on the networking icon in the taskbar would show this network name with ‘Internet access’ beneath it.
You can get the DNS host and/or domain name with GetComputerNameEx from the Windows base API: