Excel 2013 VBA - Secure Login RRS feed

  • Question

  • I am attempting to create a small spreadsheet project that logs into the Fidelity Investments website to pull specific ETF data via QueryTables on a weekly basis. I am having difficulty passing the Username to the secure Login page in VBA using the Microsoft Internet Explorer object model. Setting the Password value is not an issue.

    HTML source for the Username input control is below. Assuming all 9s have been input for the Username, note that the "data-unmasked" Attribute now contains the full input Username value (all 9s) and the "value" contains the masked input Username value (* & 9s). The "value" is easy to set. How do I set the "data-unmasked" Attribute in VBA using the IE object model? I would prefer not to use SendKeys, but will if that is the only option.

    <select name="SSN" tabindex="1" disabled="disabled" class="fs-hidden form-control" id="userId-select" aria-hidden="true" aria-required="true" required="required" data-reset-text="Use a saved username">
        <option value="new">Add/Use another username</option>

    <input tabindex="1" class="fs-mask fs-nounmask form-control valid" id="userId-input" aria-hidden="false" aria-required="true" aria-describedby="fs-user-info" required="required" type="text" maxlength="15" value="" autocomplete="off" data-msg-invalid="This field is not properly formatted" data-msg-required="Please enter your username" data-clear="true" data-masklength="-3" data-unmasked="999999999" value="******999">

    <input name="SSN" id="hiddenId" type="hidden" maxlength="15" value="999999999">

    Thursday, June 11, 2015 10:32 PM