Help for Fill Internet Form !!! (Sorry pls ignore the other faulty post)

23izkool

New Member
Joined
Mar 4, 2011
Messages
19
Hi all,
I have been at this problem for close to a year and finally got some headway but stuck at the last leg. Appreciate that someone can help me with this!
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
OBJECTIVE OF THE MACRO (BASICALLY INTERNET FORM FILLING)<o:p></o:p>
  • Open up multiple websites through the multiple weblinks recorded in a spreadsheet<o:p></o:p>
  • Click the relevant buttons & copy some numerical figures from the spreadsheet into the websites, then click on the submit button in the websites to upload the figures<o:p></o:p>
<o:p> </o:p>PROBLEMS<o:p></o:p>
  • Unable to write the macro to upload figures from the spreadsheet<o:p></o:p>
    • The fields to fill belong to ‘hidden input’ type<o:p></o:p>
    • Unable to access it like what was done for clicking edit button & submit button<o:p></o:p>
  • Currently used an alternative à use ‘sendkeys method’ to (1) tab through the other fields in the website, (2) copy figures from the spreadsheet, (3) paste into the empty field which was tabbed to<o:p></o:p>
    • However, sendkeys are very unstable & sometimes tab to the wrong field!
Will give more elaboration below!<o:p></o:p>
<o:p> </o:p>
ACTUAL WEB LAYOUT<o:p></o:p>
<o:p> </o:p>
(Fig 1 / Before clicking ‘Edit’ Button)
<o:p>
r0gabecv06mgh8gyh08w.jpg
</o:p>

(Fig 3 / Key in empty fields & Click ‘Yes’ Button)
<o:p>
w3jjzk3zvrwcmsrhxm1g.jpg
</o:p>

(Fig 4 / Figures will be populated to main screen à click ‘save’)
<o:p>
fc7ss3fu9zigi0i7bzw0.jpg
</o:p>
<o:p> </o:p>
<o:p> </o:p>
THE SPREADSHEET DATA FROM WHICH FIGURES ARE PICKED TO FILL THE EMPTY FIELDS IN THE WEBSITE<o:p></o:p>

(Figure 5 / Table in Spreadsheet)
<o:p>
crpyd8jbp3arq8wi40vf.jpg
</o:p>
<o:p> </o:p>
<o:p> </o:p><o:p> </o:p>So as I run the macro from the spreadsheet, it will:
(1) open up URL for Sector 1 à work within the webpage for Sector 1
a. click the green ‘Click here to edit’ button
b. click the red arrow to bring out the PopUp box (Red) for Branch1
c. fill in all the empty fields for Branch 1 (the empty fields for ‘Total Revenue’ & ‘Total Cost’)
d. click the green ‘Yes’ button à this will close the PopUp box & upload the figures to the empty fields (as in Fig 4)
e. click the green ‘Click here to save’ button (as in Fig 4)
(2) re-run the macro through a for-loop so that it repeats all the steps above to work on URL for Sector 2
<o:p> </o:p>
PROBLEMS<o:p></o:p>
· Without using sendkeys, I am unable to get the macro to upload the figures into the empty fields à the macro just stops & runs into errors because I do not know how to write to access the hidden input (I think)<o:p></o:p>
· Even when using sendkeys, it is very unstable à the macro updates the wrong figures, e.g. Total Revenue = 1 instead of 3 for Branch 1 (inputted the Total Cost instead). Using the above example, I am tabbing 6 times to get to the re<o:p></o:p>
· PLEASE HELP WITH THIS!!!!
· I have put in the relevant source code & the existing macro in the 2nd post as cannot fit in here. Hope someone can advise!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Re: Help for Fill Internet Form !!! (Source Code & Macro)

SOURCE CODE OF WEBSITE<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
(For Fig 1 / ‘Edit’ Button)<o:p></o:p>
<o:p> </o:p>
type="button" name=" clickmetoedit " id=" clickmetoedit" class="greenButton" value="Edit in fixed mode" *******="editModule()">

</td>
</tr>
</table>
<hr size="1" class="blue_10B" />
</td>
</tr>
<tr align="left">
<td>
<table width=100% height=100% cellspacing="1" cellpadding="1"><!-- Module start -->
<tr>
<td colspan="4">
<div id="countryPanel">
<o:p> </o:p>
<o:p> </o:p>
(For Fig 3 / To key in revenue and cost values)<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
Branch1
<input type="hidden" name="branch2" id="branchid2" class="C55_black_13" value="Branch2_PopupBox " label="Branch2">
</td>
<td width="2%" >
<img src="/standard/images/icon/arrow.gif" width="15" height="13" border="" *******="sector.ui.branchlyPanel.show('Branch2_ Popup Box ')" ***********="this.style.cursor='hand'"/>
</td>
<!--

<td align="right" id="'Branch2_ Popup Box ">
<label id="netrevenue2label" class="C55_black_13">
2
</label>
<input type="hidden" name="totalrevenue_2"
id="netrevenue2" class="C55_black_13" value="2">
</td>

<td align="right">
<label id=" totalrev2label " class="C55_black_13">3</label>
<input type="hidden" name="total_rev2" id="totalrev2" class="C55_black_13" value="4">
</td>
<td align="right">
<label id="totalcostlabel_2" class="C55_black_13">1</label>
<input type="hidden" name="totalcost_2" id="totalcost2" class="C55_black_13" value="1">
</td>
<td align="right">
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

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