Dim oShell As Object Dim command As String Set oShell = CreateObject("WScript.Shell") command = "cmd /c ipconfig & PAUSE" oShell.Run command, 1, False
'Sur une feuille place : ' - Un CommandButton ' - Un contrôle Winsock 'Puis le code Private Sub Command1_Click() MsgBox Winsock1.LocalIP End Sub 'Grace à ce contrôle tu peut aussi afficher d'autre information comme le nom du pc sur le réseau, etc...
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionDim oShell As Object Dim command As String Set oShell = CreateObject("WScript.Shell") command = "cmd /k ipconfig" 'ici on lance la console avec le paramêtre /k qui force la non fermeture auto en cas de fin d'execution oShell.Run command, 1, True