Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
Por vitorpereira33
#35857
Pessoal, bom dia.

Estou tentando baixar algumas bases que utilizo diariamente, usando um codigo VBA para puxar da Internet Explorer.

Consigo fazer ele logar e chegar até a pagina onde realizo o download, mas não consigo fazer o codigo clicar em um dropbox para dar uncheck em alguns filtros que ficam automaticamente selecionados.

alguém consegue me ajudar?



Segue o código que estou utilizando e a imagem do inspecionamento do elemento no chrome:

Código: Selecionar todos
Sub OKButton_Click()
 Plan3.Activate
    Dim ProductionAddress As String
    ProductionAddress = "https://gdbmw.portaltecsinapse.com.br/p/crm/exportacoes/"

Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
With ie
    .Silent = True
    .Visible = True
    .navigate ProductionAddress


While ie.ReadyState <> 4 Or ie.Busy: DoEvents: Wend

        .Document.getelementbyid("username").Focus
        .Document.getelementbyid("username").Value = "vitor.goncalves@bmw.com.br"  'seu usuario no site
        .Document.getelementbyid("password").Focus
        .Document.getelementbyid("password").Value = "Vitorp12"  'sua senha no site
        .Document.All("kc-login").Click     'id do botao para acessar o site


While ie.ReadyState <> 4 Or ie.Busy: DoEvents: Wend

    ie.Document.All.Item("form:j_idt296")(2).Checked = True 'parte que nao funciona
    

Set objButton = ie.Document.getelementbyid("form:j_idt296") 'nao funciona
    objButton.Focus


    ie.Document.getelementbyid("form:j_idt318").Value = "10/8/2018" 'colocando a data inicial
    
    ie.Document.getelementbyid("form:j_idt320").Value = "12/8/2018" 'colocando data final

    




End With

End Sub
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord