Excel VBA to edit response in Google sheet via Google form

kshukla

New Member
Joined
Aug 17, 2016
Messages
1
[FONT=&quot]I have this Excel VBA code to edit response of Google form, this code is working for one url but how to edit all existing response with excel until the last empty row. Any help will make my day.. I am working from 2 to 3 days for the same and search forum but no solution. I am attaching excel picture and also code with my question for a reference.[/FONT]
[FONT=&quot]Goal - Simply I want to do loop so that code will take URL from cell D2 to D100 and edit all response on Column A, B & C on excel to google sheet via google form. Right now I am able to edit one respnse without loop and inserting Url directly between "". Sample URL is -[/FONT]
https://docs.google.com/forms/d/e/1FAIpQLSfXOMuXvqpPY7bc1cUVoyV9lr2q7H_N02iRMqtOlUKcrpZJRQ/viewform?edit2=2_ABaOnuc7hWCAps-n-gegOGQneT-74tcax9mpCEuSlQqxsurIYcO2u8WA3QqP

<tbody>
</tbody>
[FONT=&quot]
HTML:
Sub GoogleFormResponseEditMultipleEntry()[/FONT][/COLOR]
Dim Resultado As StringDim Url As String, DatoMetedoPost As String, NumRows As IntegerDim x As IntegerDim winHttpSolicitud As ObjectSet winHttpSolicitud = CreateObject("WinHttp.WinHttpRequest.5.1")
Worksheets("Sheet2").Activate
NumRows = Range("E2", Range("E2").End(xlDown)).Rows.Count
Range("A2").Select
For x = 1 To NumRows
Url = Cells(x + 1, 4).Text

DatoMetedoPost = "entry.302814826=" & Cells(x + 1, 1).Value & "&entry.1067267369=" & Cells(x + 1, 2).Value & "&entry.710703911=" & Cells(x + 1, 3).Value
winHttpSolicitud.Open "Post", Url, FalsewinHttpSolicitud.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"winHttpSolicitud.send (DatoMetedoPost)Resultado = winHttpSolicitud.responseText
ActiveCell.Offset(1, 0).Select
Next x
End Sub
[COLOR=#242729][FONT=&quot]
[/FONT]
 

Forum statistics

Threads
1,082,275
Messages
5,364,178
Members
400,785
Latest member
Mahar92

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top