Public Sub GetMyIP()
Dim strComputer As String Dim objWMI As Object Dim colIP As Object Dim IP As Object Dim i As Integer strComputer = "." Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colIP = objWMI.ExecQuery _ ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE") For Each IP In colIP If Not IsNull(IP.IPAddress) Then For i = LBound(IP.IPAddress) To UBound(IP.IPAddress) MsgBox IP.IPAddress(i), vbInformation, IP.Description(i) Next End If Next MsgBox "Excel版本信息為:" & Application.CalculationVersion MsgBox "Excel當(dāng)前允許使用的內(nèi)存為:" & Application.MemoryFree MsgBox "Excel當(dāng)前已使用的內(nèi)存為:" & Application.MemoryUsed MsgBox "Excel可以使用的內(nèi)存為:" & Application.MemoryTotal MsgBox "本機(jī)操作系統(tǒng)的名稱和版本為:" & Application.OperatingSystem MsgBox "本產(chǎn)品所登記的組織名為:" & Application.OrganizationName MsgBox "當(dāng)前用戶名為:" & Application.UserName MsgBox "當(dāng)前使用的Excel版本為:" & Application.Version End Sub |
|