Remove part of an inout element VBA HTML

TheEnergyMan

New Member
Joined
Mar 12, 2019
Messages
12
Hi,

In order to automate a site and get around using the date picker ive found I can remove the 'read only' part of the input on the site which allows me to input the date, however i cant seem to automate this.

Im trying to change :

<input id="fromDatePicker" placeholder="" readonly="readonly" style="width:130px" type="text" class="hasDatepicker">


to:

<input id="fromDatePicker" placeholder="" style="width:130px" type="text" class="hasDatepicker">


Ive tried using ie.document.getattributebyID("fromDatePicker").removeattribute("readonly") But i cant see, to get it to work.

for reference I'm using internet explorer

any help with this matter is appreciated, Thanks!
 
Last edited:

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Try this:
Code:
    IE.Document.getElementById("fromDatePicker").removeAttribute ("readonly")
 
Upvote 0

Forum statistics

Threads
1,215,616
Messages
6,125,862
Members
449,266
Latest member
davinroach

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