DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub My_IP()
MsgBox "IP Numaranız: " & External_IP("http://www.showmyip.com/simple/")
End Sub
Private Function External_IP(URL As String) As String
Dim IE As Object, txt As Variant
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate URL
Do While IE.Busy: Loop
txt = IE.Document.All
External_IP = """" & Left$(txt.InnerText, InStr(1, txt.InnerText, " ") - 1) & """"
Set IE = Nothing
End Function
Sub Test()
' Raider ® 02/09/2005
If Err.Number <> 0 Then
MsgBox "WMI yüklenmemiş! Programdan çıkılacak...", vbExclamation, _
"Windows Management Instrumentation"
Exit Sub
On Error GoTo 0
End If
strComputer = "."
Set objWMI = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set collIP = objWMI.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled=TRUE")
For Each RetVal In collIP
MsgBox "IP adresi :" & RetVal.IPAddress(0), vbInformation, _
"IP Adresi .... Raider ®"
Next
End Sub