How to fill the input box online

excasme

New Member
Joined
Aug 1, 2013
Messages
2
Hi All,
I want to develop a vba prog to automatically fill in the input box in the a forum shown in the following link, which is in Chinese. The input box is on the bottom of the page. Actually, it is pretty much like the one we are using on mrexcel forum.
¡¾µêÆÌÓªÏú¡¿ÖвîÆÀÄã²»µÃ²»ÖªµÀµÄΣº¦ - ÍøÉÌÂÛ½£ - ÌÔ±¦ÂÛ̳ - ÌÔ±¦Íø
By using the Firefox's page inspector, I can see it is not a regular input box. I don't know how to grasp the input tag which allows me to set the my message to the object.
my program is like this:

Sub replythread()

Dim thrdlink
Dim IE As Object
Dim objCollection As Object

Set IE = CreateObject("InternetExplorer.Application")
thrdlink = Cells(2, 2).Value

IE.Navigate "http://bbs.taobao.com/catalog/thread/1338197-263459730.htm"
IE.Visible = True

Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Application.Wait (Now + TimeValue("0:00:02"))

Dim doc As MSHTML.HTMLDocument

Set doc = IE.document

Set objCollection = doc.getElementsByTagName("fieldset")

Set objCollection(0).Value = "support and mark" 'pseudocode and isn't supported by vba
objcollection(0).click 'pseudocode and isn't supported by vba

End Sub

The last two lines of code are pseudocode which means to input the word "support and mark" and submit it. This two lines of code didn't work since VBA doesn't support it.


Anybody has an idea about how to automatically input content and submit.

Any suggestion is welcome.

Thanks in advance.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
I'm thinking of a third party program like AutoHotKey.
I recently used it to send a webtext from the internet to my mobile phone.
 
Upvote 0
I'm thinking of a third party program like AutoHotKey.
I recently used it to send a webtext from the internet to my mobile phone.

Thanks for the suggestion. I took a quick look at the AutoHotKey and it is cool. However, I don't think it is up to the job I want. I have a list of links kept in the spreadsheet and I want the excel macro to read these links, open in IE, fill the input box and submit.
 
Upvote 0

Forum statistics

Threads
1,217,455
Messages
6,136,749
Members
450,025
Latest member
Beginner52

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top