Hi, my advice is to search the forum on how http download works and follow those examples.
In short, the download command is asynchronous so the code flows past it ( this is why you should terminate your button click sub soon after the download command).
Once the server reply, jobdone is executed and your program's flow starts from there.
Sorry to be so short in my answer, but I'm using a small virtual keyboard..