Jump to content
Sign in to follow this  
Nothing Forest

[Resolvido] Ajuda com XMLHttpRequest

Recommended Posts

Nothing Forest

Boas, estou com um problema num trabalho em que tenho de usar VBA...

Bem este programar consiste em aceder a um servidor e encontrar um ficheiro.. Para isso estive a ver na internet e o que me percebi é que tinha de usar o xmlhttprequest...

Bem estou com problemas nisso, nunca trabalhei com esse codigo.

Alguém aqui tem paciência para me ajudar ou conhece algum tutorial que esteja funcional?

Obrigado & Cumps.

Rui Moreira

Share this post


Link to post
Share on other sites
Nothing Forest

Para quem quiser usar o mesmo comando aqui fica o [codigo Exemplo].

Dim XMLHttpRequest As New MSXML2.XMLHTTP

    With XMLHttpRequest
    .open "GET", "http://www.portugal-a-programar.pt/topic/60683-ajuda-com-xmlhttprequest/", False, "", ""
    .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    .send "method=login&handle=cautionmp&pass=*"
    End With
     MsgBox "" & XMLHttpRequest.status


PS: Não esquecer de adicionar a referencia "Microsoft XML V6.0"

Edited by Nothing Forest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.