Selecting/actioning items in Kendo UI widgets using Excel VBA

后端 未结 3 1640
时光说笑
时光说笑 2021-01-03 17:32

Stuck - Need help !

I\'m trying to automate actioning items in an IE web page on our internal company site. I\'m able to fill out any kind of text object

3条回答
  •  再見小時候
    2021-01-03 18:01

    here is a shot in the dark .... lol

    this may be a similar page

    single step the code

    Option Explicit
    
    Sub extractKendo()
    
    '    Dim IE As Object
    '    Set IE = CreateObject("InternetExplorer.Application")
    
        Dim ie As InternetExplorer
        Set ie = New InternetExplorer
    
        ie.Visible = True
    
        ie.navigate "http://demos.telerik.com/kendo-ui/grid/index"
    
        While ie.readyState <> 4 Or ie.Busy
            DoEvents
        Wend
    
        Dim doc As HTMLDocument
        Set doc = ie.Document
    
        Dim elm As IHTMLElementCollection
    
        Set elm = doc.getElementsByClassName("k-link k-pager-nav")
        elm(0).Click
        elm(4).Click
        elm(0).Click
        elm(3).Click
        elm(3).Click
        elm(3).Click
        elm(0).Click
    
        Set elm = doc.getElementsByClassName("k-list-scroller")
        Set elm = elm(1).getElementsByTagName("li")
    
        elm(0).Click
        elm(1).Click
        elm(2).Click
        elm(3).Click
    
        ie.Quit
    
        Set ie = Nothing
    
    End Sub
    

提交回复
热议问题