title: send Enter(~) key using vba to an outside IE object
body: <p>I'm stuck with the following task: from an excel file I send data (for a certain column into the sheet I send the cell values) to a specific IE object predefined.</p>
  
  <p>The data is sent onto the website in a textarea field (identified onto the website through an ID:id1) using a macro. For each cell value/data added into the textarea field of the website Enter key/command need to be done/appended automatically as this will generate some of the empty input fields to be completed automatically onto the website (the code is listed below:)</p>
  
  <p>I'm struggling with a method of automatically send the ENTER key onto the website into the textarea after the data is inserted  </p>
  
  <p>Code updated..</p>
  
  <pre><code>Sub adddata()
  
      Dim objIE As Object
      Dim objTR As Object
      Dim i, j, counter As Integer
      Dim lastRow As Long
      counter = 1
  
      Set objIE = GetIeByTitle("https://exampletest.com", True, True)
  
      Dim lastRow2 As Integer
      lastRow2 = Workbooks(path1).Worksheets("Test").Range("A" &amp; Rows.Count).End(xlUp).Row
  
      Workbooks(path1).Worksheets("Test").Activate
  
      contor = 1
  
      'First of all the unhidden files have to be take from the target excel file
      'Selecting the unhidden lines from the excel file
      For j = 1 To lastRow2
          If Rows(j).EntireRow.Hidden = False Then
              Workbooks(path1).Worksheets("Test").Range("A" &amp; j &amp; ":Z" &amp; j).Select
              Selection.Copy
              ThisWorkbook.Worksheets("Test2").Range("A" &amp; counter).PasteSpecial
              counter = counter + 1
          End If
      Next j
  
      'look into the new excel file containing just the unhidden lines
      'Afterwards a look up through new excel file cells
      For i = 2 To counter
          objIE.document.getelementbyid("id1").Value = Worksheets("Test2").Range("C" &amp; i).Value ' taking the value from the cell and adding it on the text area field
          objIE.document.getelementbyid("id1").SetFocus
          Application.SendKeys "~" ' sending the enter key
          Application.Wait (7)     ' add the delay of 7 seconds
  
          '2nd field
          objIE.document.getelementbyid("id2").Value = Worksheets("Test2").Range("D" &amp; i).Value
  
          '3rd field
          objIE.document.getelementbyid("id3").Value = Worksheets("Test2").Range("E" &amp; i).Value
  
      Next i
  
  End Sub
  </code></pre>