vba internet explorer automation

Otto5891

New Member
Joined
Feb 1, 2014
Messages
1
hi there,

I try to fill in an online form using vba,

I use this code:


IENew.document.getElementById("id_price").Value = 850

There are 2 forms on the homepage, one for buying one for selling, the problem is, this code line only works for the buy form. How do I have to adjust the line of code I have to tag not the first "id_price" in the html code, but the second?

here is a part of the html code,


for="sell_amount" class="label">Amount to sell:<a href="<a href=" http:="" www.mrexcel.com="" forum="" view-source:https:="" www.bitstamp.net="" market="" order="" #"="" target="_blank">#" id="sell_all" class="all">(All)<input autocomplete="off" class="input" id="id_amount" name="amount" style="margin:0px;" type="text">BTC
<!-- POMEMBNO! pri napaki je tukaj dodan class .error --><label for="sell_amount_usd" class="label">Sell price:</label><a href="<a href=" http:="" www.mrexcel.com="" forum="" view-source:https:="" www.bitstamp.net="" market="" order="" #"="" target="_blank">#" id="sell_advanced" class="all">(Advanced)<input autocomplete="off" class="input auto_update" id="id_price" name="price" style="margin:0px;" value="804.30" type="text">USD

<!-- POMEMBNO! pri napaki je tukaj dodan class .error --><label for="sell_limit_price" class="label">Buy if executed price:</label><input autocomplete="off" class="input auto_update" id="id_limit_price" name="limit_price" style="margin:0px;" type="text">
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,217,380
Messages
6,136,222
Members
450,000
Latest member
jgp19

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