A
AP
This code gives the IP address of the computer. It however displays a
command window momentarily. How can I prevent the window from being
displayed ? Thanks.
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("%comspec% /c ipconfig")
Do While oExec.stdOut.AtEndOfStream <> True
StrLine = oExec.stdOut.Readline
If InStr(StrLine, "Address") > 0 Then
'found
strIP = StrLine
Exit Do
End If
Loop
MsgBox Mid(strIP, (InStr(strIP, ":") + 2))
command window momentarily. How can I prevent the window from being
displayed ? Thanks.
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("%comspec% /c ipconfig")
Do While oExec.stdOut.AtEndOfStream <> True
StrLine = oExec.stdOut.Readline
If InStr(StrLine, "Address") > 0 Then
'found
strIP = StrLine
Exit Do
End If
Loop
MsgBox Mid(strIP, (InStr(strIP, ":") + 2))