</tr><tr IsParameterRow="true">
<td class="ParamLabelCell"><label for="ReportViewerControl_ctl04_ctl07_txtValue"><span>Enter Number</span></label></td><td class="ParamEntryCell" style="padding-right:0px;"><div id="ReportViewerControl_ctl04_ctl07">
<input name="ReportViewerControl$ctl04$ctl07$txtValue" type="text" size="30" id="ReportViewerControl_ctl04_ctl07_txtValue" disabled="disabled" class="DisabledTextBox" />
</div></td>
</tr>
for the above HTML code I am unable to feed number in vba. please suggest. below is the VBA code for inputting data.
sub my()
Dim IE As Object
Dim objElement As Object
Dim objCollection As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate Link
Do While IE.Busy
Application.Wait DateAdd("s", 1, Now)
Loop
IE.document.getElementsById("ReportViewerControl_ctl04_ctl07_txtValue") = 12345
End Sub()
<td class="ParamLabelCell"><label for="ReportViewerControl_ctl04_ctl03_txtValue"><span>Enter Start Date Here</span></label></td><td class="ParamEntryCell" style="padding-right:0px;"><div id="ReportViewerControl_ctl04_ctl03">
<div onactivate="event.cancelBubble=true;" style="white-space:nowrap;">
<input name="ReportViewerControl$ctl04$ctl03$txtValue" type="text" value="11/29/2015" size="28" onchange="javascript:setTimeout('__doPostBack(\'ReportViewerControl$ctl04$ctl03$txtValue\',\'\')', 0)" onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return false;" id="ReportViewerControl_ctl04_ctl03_txtValue" disabled="disabled" class="DisabledTextBox" /> <input src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=11.0.5058.0&Name=Microsoft.Reporting.WebForms.calendar_disabled.gif" name="ReportViewerControl$ctl04$ctl03$ddDropDownButton" type="image" id="ReportViewerControl_ctl04_ctl03_ddDropDownButton" alt="Select a value" title="Select a value" style="cursor:pointer;" disabled="disabled" />
</div>
</div></td>
I have another input box for date but the same thing I m using for date box. Its showing error "Object doesnot support this property or method
IE.document.getElementById("ReportViewerControl_ctl04_ctl03").Value = sdate
where sdate contain current date
IE.Document.getElementById("ctl32_ctl04_ctl03_txtValue").value = SDate
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.