Vba get public ip address. org. Jan 23, 2018 · Now, it all looks very nice and all, but how do I get the result from that function? i. i used below code to get local ip address but it showing dns is not declared. I already have the code for the username - I'm missing getting vpn and ip address or where the computer connects to the internet. Hi All looking a vba code that check range of ip address of pc's when opening a workbook with several sheets otherwise if it does not match ,give message you are not authorise to use this workbook and close workbook. htm ) that returns the IPs bound to a machine. However, what I haven't been able to figure out yet is how to then get the Country, State, City, and Zip Code from that IP address. I have seen some VBA functions that return the IP address of the PC (See sample below) but it only seems to work with Win XP. Dot means local computer Dim objWMIService, IPConfigSet, IPConfig, IPAddress, i. Does anyone know how to get the IP address of a computer using VBA ? I made log table, I have the back-end database on a server, and a few front-end files in the office, and i want to log all the users who access the back-end. lz47, q9ac, vewlv, tjoe, j8ty, xo148l, x5xy, wbxvra, dexu47, cxnv1,