I am trying to form a macro that copies a range of cells from an excel worksheet to a text field in internet explorer. I am able to get the macro to navigate to the text field that I want my cells to be copied to and I am even able to get something to copy to the text field. However, the result is that the text box only gets the string "[object]" pasted into it.
Below are the relevant sections of code that I have (the rest of the code in my macro takes me to the webpage and sets up the data in the cells to be copied):
For i = 85 To 119
If Cells(i, 2).Value <> "" Then
Cells(j, 3).Value = Cells(i, 2).Value
j = j + 1
End If
Next i
K = "C85:C" & CStr(j - 1)
Range(K).Select
Selection.Copy
...
...
...
ie.document.All.Item("draftText").Value = Sheets("IYM Calculation").Range(K)
Does anyone have any advice or ideas on why this might not be working for me? Is this even possible?
Below are the relevant sections of code that I have (the rest of the code in my macro takes me to the webpage and sets up the data in the cells to be copied):
For i = 85 To 119
If Cells(i, 2).Value <> "" Then
Cells(j, 3).Value = Cells(i, 2).Value
j = j + 1
End If
Next i
K = "C85:C" & CStr(j - 1)
Range(K).Select
Selection.Copy
...
...
...
ie.document.All.Item("draftText").Value = Sheets("IYM Calculation").Range(K)
Does anyone have any advice or ideas on why this might not be working for me? Is this even possible?