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]
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,215,064
Messages
6,122,942
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top