Excel VBA macro to fill web form using excel data

imgaur7

New Member
Joined
Dec 25, 2017
Messages
32
Hi there,


I am new to this but learning from the experts like you, kindly ignore if the question look naive here.


I wanted to open a web site from the excel data and then fill the data as per the web page element ID's and submit the form, close the IE page and more to next web site in excel and repeat the steps.

(Separated every thing With a line To clear the thought process)


website name ===== ***.com (from Excel sheet)
<option value="114948"-Test 1-/option- ===== To select Test 1 option from drop down
-----------------------------------
<input type="text" id="text_date" name="text_date" value="" /- ===== to paste data from excel cell In text box
-----------------------------------
<div class="email_to">
<label-Email To-/label>
<input type="text" name="mail_to" value="" /> ===== Email address from excel To be pasted here
-----------------------------------
<input type="submit" class="submit" value="Submit" /> ===== Click on submit button
-----------------------------------
(Wait For 5 sec To page To load)
-----------------------------------
<div class="select_question" id="question_5441810_response"-
<select name="question_5441810"-
<option value="29240457" -Choose-/option- ===== select Option from the excel sheet (here it will be Yes)
<option value="29240458" -Yes-/option>
<option value="29240459" -No-/option>
<option value="29240460" -NA-/option>
-----------------------------------
<div class="select_question" id="question_5441815_response"> ===== select Option from the excel sheet (here it will be Yes)
<select name="question_5441815">
<option value="29240503" -Choose-/option>
<option value="29240504" -Yes-/option>
<option value="29240505" -No-/option>
-----------------------------------
<div class="text_question" id="question_5441812_response"- ===== enter TEXT As mentioned In excel data sheet
<input type="text" name="question_5441812" value="" />
-/div-
-----------------------------------
<div class="checkbox_question" id="question_5441823_response"- ===== Check Box question To be selected With id 5441823
-----------------------------------
<input type="submit" value="Review" class="submit"- ==== Submit the page (wait For 5 sec)
-----------------------------------
Close the IE page after 10 sec.
Move To Next value In excel sheet And Loop next web site address from the excel sheet.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
here is what is required.
Rich (BB code):
(Separated every thing With a line To clear the thought process) 
 
 
website name	=====	***.com (from Excel sheet) 
<option value="114948"-Test 1-/option-	=====	To select Test 1 option from drop down 
----------------------------------- 
<input type="text" id="text_date" name="text_date" value="" /-	=====	to paste data from excel cell In text box 
----------------------------------- 
<div class="email_to"> 
<label-Email To-/label> 
<input type="text" name="mail_to" value="" />	=====	Email address from excel To be pasted here 
----------------------------------- 
<input type="submit" class="submit" value="Submit" />	=====	Click on submit button 
----------------------------------- 
(Wait For 5 sec To page To load) 
----------------------------------- 
<div class="select_question" id="question_5441810_response"- 
<select name="question_5441810"- 
<option value="29240457" -Choose-/option-	=====	select Option from the excel sheet (here it will be Yes) 
<option value="29240458" -Yes-/option> 
<option value="29240459" -No-/option> 
<option value="29240460" -NA-/option> 
----------------------------------- 
<div class="select_question" id="question_5441815_response">	=====	select Option from the excel sheet (here it will be Yes) 
<select name="question_5441815"> 
<option value="29240503" -Choose-/option> 
<option value="29240504" -Yes-/option> 
<option value="29240505" -No-/option> 
----------------------------------- 
<div class="text_question" id="question_5441812_response"-	=====	enter TEXT As mentioned In excel data sheet 
<input type="text" name="question_5441812" value="" /> 
-/div- 
----------------------------------- 
<div class="checkbox_question" id="question_5441823_response"-	=====	Check Box question To be selected With id 5441823 
----------------------------------- 
<input type="submit" value="Review" class="submit"- ==== Submit the page (wait For 5 sec) 
----------------------------------- 
Close the IE page after 10 sec. 
Move To Next value In excel sheet And Loop from excel sheet for next web address at start
 
Upvote 0
Code:
option value="114948"-Test 1-/option-	=====	To select Test 1 option from drop down ----------------------------------- 
input type="text" id="text_date" name="text_date" value="" /-	=====	to paste data from excel cell In text box 
----------------------------------- 
div class="email_to" 
label-Email To-/label 
input type="text" name="mail_to" value="" /	=====	Email address from excel To be pasted here 
----------------------------------- 
input type="submit" class="submit" value="Submit" /	=====	Click on submit button 
----------------------------------- 
(Wait For 5 sec To page To load) 
----------------------------------- 
div class="select_question" id="question_5441810_response"- 
select name="question_5441810"- 
option value="29240457" -Choose-/option-	=====	select Option from the excel sheet (here it will be Yes) 
option value="29240458" -Yes-/option 
option value="29240459" -No-/option 
option value="29240460" -NA-/option 
----------------------------------- 
div class="select_question" id="question_5441815_response"	=====	select Option from the excel sheet (here it will be Yes) 
select name="question_5441815" 
option value="29240503" -Choose-/option 
option value="29240504" -Yes-/option 
option value="29240505" -No-/option 
----------------------------------- 
div class="text_question" id="question_5441812_response"-	=====	enter TEXT As mentioned In excel data sheet 
input type="text" name="question_5441812" value="" / 
-/div- 
----------------------------------- 
div class="checkbox_question" id="question_5441823_response"-	=====	Check Box question To be selected With id 5441823 
----------------------------------- 
input type="submit" value="Review" class="submit"- ==== Submit the page (wait For 5 sec) 
----------------------------------- 
Close the IE page after 10 sec. 
Move To Next value In excel sheet And Loop
<option value="114948" -test="" 1-="" option- ="==== To" select="" test="" 1="" option="" from="" drop="" down=""
-----------------------------------
<input type="text" id="text_date" name="text_date" value="" - ="==== to" paste="" data="" from="" excel="" cell="" <font="" color="blue">In text box
-----------------------------------

<label-email to-="" label="">
<input type="text" name="mail_to" value=""> ===== Email address from excel To be pasted here
-----------------------------------
<input type="submit" class="submit" value="Submit"> ===== Click on submit button
-----------------------------------
(Wait For 5 sec To page To load)
-----------------------------------
<option value="29240458" -yes-="" option=""> </option><option value="29240459" -no-="" option=""> </option><option value="29240460" -na-="" option=""> ----------------------------------- ===== select Option from the excel sheet (here it will be Yes) </option></select>
<option value="29240503" -choose-="" option="">
</option><option value="29240504" -yes-="" option="">
</option><option value="29240505" -no-="" option="">
-----------------------------------
As mentioned In excel data sheet
<input type="text" name="question_5441812" value="">
-/div-
-----------------------------------
To be selected With id 5441823
-----------------------------------
<input type="submit" value="Review" class="submit" -="===" submit="" the="" page="" (wait="" <font="" color="blue">For 5 sec)
-----------------------------------
Close the IE page after 10 sec.
Move To Next value In excel sheet And Loop from excel sheet for next web address at start[/code][/QUOTE]



</option>
</label-email>
</option>
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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