Quang has attended:
Excel VBA Advanced course
Automatic process
Hi, I would like to ask if it is possible to write a VBA code in Excel to do the following.
1. open a website
2. log in
3. input a date and download a file
4. save it as excel file.
The tricky bit is step 2 & 3. I need to do this everyday, so if I can automate this process, it is very helpful.
Many thank.
Quang
RE: Automatic process
Hello Quang,
Unfortunately this is a tricky piece of code, as the version of browser you use will make a difference. But to point you in the right direction, you'll need to load the Ref Library in VBE, "Microsoft Internet Control".
You'll need to look at the source code of the website to locate the object names that hold the username and password.
You will then need to identify what part of the web page you require, usually a table. Identify the table either by name or loop through table objects.
Build a userform to hold the login details.
Since there are numerous options re: page code used by the website, browser version etc. You may be able to search for specific code related to the particular website you wish to use.
I hope this resolves your question. If it has, please mark this question as resolved.
If you require further assistance, please reply to this post. Or perhaps you have another Microsoft Office question?
Have a great day.
Regards,
Mark
Microsoft Office Specialist Trainer