トイウコトデ、めげないでブログ続けることにしました。

2015年2月15日
文字数[351文字] この記事は0分26秒で読めます.

Private Sub UserForm_Initialize()
    Dim WSH, OExec As Object
    Dim s_Cmd As String
    Dim hoge As String
    Set WSH = CreateObject("WScript.Shell")
    s_Cmd = "ipconfig"
    Set OExec = WSH.Exec("%ComSpec% /c " & s_Cmd)
    hoge = OExec.StdOut.ReadAll
    ipecho.Caption = hoge
    Set OExec = Nothing
    Set WSH = Nothing
End Sub