+ Reply to Thread
Results 1 to 2 of 2

Problème d'affichage de ping sur excel (urgent svp)

  1. #1
    Registered User
    Join Date
    05-13-2015
    Location
    France
    MS-Off Ver
    2010
    Posts
    1

    Problème d'affichage de ping sur excel (urgent svp)

    Bonjour,
    J'aurai besoin de votre aide pour un code VBA que j'ai commencé et que j'ai pas su finir étant donné que je suis débutante.
    Il s'agit d'effectuer un ping pour un site / un poste régulièrement (chaque 15secondes par exemple) et par la suite pouvoir faire une somme de temps d'attente et finalement faire un graphique qui montre tout ça.
    Le soucis pour l'instant est que que je lance le ping il s'affiche sur une case et après 15 secondes se relance sur la même case. En d'autres mots, je n'arrive pas à faire afficher les résultats des ping les uns au dessous des autres. Pourriez vous m'aider à le modifier?
    et si vous pouvez me donner des astuces pour le calcul de temps d'attente ou le graphique, j'en serai reconnaissante.
    Merci beaucoup d'avance

    Voici le code:
    Sub Ping()

    'créer une boucle
    i = 6


    'le ping s'affichera sur la ligne 6, colonne 1
    While (ActiveSheet.Cells(i, 1) <> "")

    Adresse = ActiveSheet.Cells(i, 1)

    'variable pour excécuter la commande
    Dim PingExe As String
    PingExe = "C:\Windows\System32\PING.exe " + Adresse

    'Créer un Script Shell et l'excécuter à travers C:\Windows\System32\PING.exe
    Set Sh = CreateObject("WScript.Shell")
    Set ShellExe = Sh.Exec(PingExe)

    'Afficher le résultat sur Excel
    lecture = ShellExe.StdOut.ReadAll
    ActiveSheet.Cells(i, 2) = lecture
    i = i + 1
    Application.OnTime Now + TimeValue("00:00:15"), "ping"
    Wend
    End Sub

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Problème d'affichage de ping sur excel (urgent svp)

    Welcome to the forum.

    I mooved your thread to "Non English" sub-forum. Pls take some minutes to read forum rules because:

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Converting a Ping Log to Average Ping per Hour Chart
    By AndroidNine in forum Excel General
    Replies: 7
    Last Post: 08-22-2013, 01:38 AM
  2. probléme excel 2007
    By soprinal in forum Excel General
    Replies: 2
    Last Post: 03-20-2012, 03:56 PM
  3. Ping from Excel - Almost there
    By RRohl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2006, 02:30 AM
  4. Affichage onglets
    By Gui Gui in forum Excel General
    Replies: 0
    Last Post: 02-28-2005, 02:06 PM
  5. [SOLVED] ping in excel
    By Andy Mohan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-21-2005, 07:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1