PDA

View Full Version : Need a Help to expand the data in HTML Page in Internet Explorer



kissisvarmas
03-31-2017, 12:20 AM
Hi, I am trying to expand the table in the web page of internet explorer, there is a scroll button where we need to select input value, the table will expand accordingly as per the input value changed in the scroll button, when i select the input value manually the table will expand accordingly, but when try to change the input value through the macro the the table is not expanding accordingly please find the snap shots and VBA codes, please help on this.18811

Here the default input value is "10", when i change to "ALL" through the macro, the page was not expanding total tables. below is the code:

Sub test()Dim ie As New SHDocVw.InternetExplorer
Dim hdoc As MSHTML.HTMLDocument
Dim sURL As String
Dim hinput As MSHTML.IHTMLElement
sInput = "Input"
ie.Visible = True
ie.navigate Sheets(sInput).Range("A1").Value
Do Until ie.readyState = READYSTATE_COMPLETE
Loop
Set hdoc = ie.document
Set hinput = hdoc.getElementById("username")
hinput.Value = Sheets(sInput).Range("D6").Value
Set hinput = hdoc.getElementById("password")
hinput.Value = Sheets(sInput).Range("D7").Value
Set hinput = hdoc.getElementById("DatabaseLoginBtn")
hinput.Click
Do While ie.Busy
Application.Wait (Now + TimeValue("0:00:01"))
Loop


Set hinput = hdoc.getElementById("FilesTabName")
hinput.Click
Set hinput = hdoc.getElementById("FilesTabUnpackedTabName")
hinput.Click
Set hinput = hdoc.getElementsByClassName("form-control input-sm")(2)
'"10" Represents value 10, "25" represents value 25, "-1" represents "ALL"
hinput.Value = "-1"
End Sub