title: VBA loop: Automate web form filling
body: <p>My goal is to Fill web forms using dynamic data which is stored in excel table.
  The proccess should look like the below:</p>
  
  <ol>
  <li>A.
  
  <ol>
  <li>Go to link stored in "A"i</li>
  <li>Fill the given fields in web form using data from "A"i to "G"i</li>
  <li>Click "save"</li>
  <li>Wait 5 seconds</li>
  <li>Populate column "H"i with text: "Created"</li>
  <li>Repeat next line (i+1) until last row</li>
  <li>When finished(after last row), msgbox: "proccess completed"</li>
  </ol></li>
  </ol>
  
  <blockquote>
    <p>Below is my version without a loop that works but only for B2:G2 Row.</p>
  </blockquote>
  
  <pre><code>Sub copy_project_loop()
  
  Dim IE As Object
  Dim Doc As HTMLDocument
  Set IE = CreateObject("InternetExplorer.Application")
  Dim SHELL_OBJECT
  SHELL_OBJECT = "WScript.Shell"
  Set objShell = CreateObject(SHELL_OBJECT)
  
  
  IE.Visible = True
  IE.navigate "URL link"
  
      Do While IE.Busy
           Application.Wait DateAdd("s", 1, Now)
      Loop
      Set Doc = IE.document
  
  Doc.getElementById("Project|Name").Value = ThisWorkbook.Sheets("data").Range("B2").Value
  Doc.getElementById("customer|UserDefinedIdTA").Value = ThisWorkbook.Sheets("data").Range("C2").Value
      Doc.getElementById("customer|UserDefinedIdTA").Focus
          objShell.SendKeys "{Enter}"
              Application.Wait DateAdd("s", 2, Now)
  Doc.getElementById("selEngagement").Value = ThisWorkbook.Sheets("data").Range("D2").Value
  Doc.getElementById("txtPlannedStart").Value = ThisWorkbook.Sheets("data").Range("E2").Value
  Doc.getElementById("Project|ProjTimeAppTA").Value = ThisWorkbook.Sheets("data").Range("F2").Value
  Doc.getElementById("Project|SecondProjTimeAppTA").Value = ThisWorkbook.Sheets("data").Range("G2").Value
      Application.Wait DateAdd("s", 5, Now)
  Doc.getElementById("Button1").Click
  
  End Sub
  </code></pre>
  
  <p>Kindly assist me to define a loop for this task.</p>
  
  <p>Thanks for your support,
  Slava.</p>