![]() |
Get text from a Html form
Hello folks..
I'm trying to get text from a html form, and store the information into a variant, or just place the information as text in a cell... Could anybody help me? Thanks for advance. |
Get text from a Html form
Where is the HTML form ? On the web? Local File? String variable ?
Best approach is to load the page in IE and then use the Document Object Model to access the element of interest. Eg; Msgbox objIE.document.forms(0).elements("txtInput").value Plenty of past posts on this in this group: search in google groups for "automate IE" -- Tim Williams Palo Alto, CA "josuegm" wrote in message oups.com... Hello folks.. I'm trying to get text from a html form, and store the information into a variant, or just place the information as text in a cell... Could anybody help me? Thanks for advance. |
Get text from a Html form
I'm loading the page using this:
Dim oBk As Workbook link = Cells(i, 27).Value Set oBk = Workbooks.Open(link) As you may know, this code place the information from web on excel... There is an information required for me, which is placed inside an html form... I tried using something like HTMLText.value, and it worked... but only if I place this information in the HTML Form code... And I can't call this module... An error like "Macro not found" or something appears... |
Get text from a Html form
Try loading the page into IE and getting the value from there.
Search google groups on "automate IE". Eg: http://groups.google.com/group/micro...32064e785f9e00 Tim josuegm wrote: I'm loading the page using this: Dim oBk As Workbook link = Cells(i, 27).Value Set oBk = Workbooks.Open(link) As you may know, this code place the information from web on excel... There is an information required for me, which is placed inside an html form... I tried using something like HTMLText.value, and it worked... but only if I place this information in the HTML Form code... And I can't call this module... An error like "Macro not found" or something appears... |
Get text from a Html form
Man, I did what you told me to do, but the great majority of posts are
about sending data from Excel to a web page... And what I want is exactly the opposite... There's an evil witch flying around my purposes... Goddamn... I found out a way to get the same information from the website, and this one is not placed in a HTML Form... But, oh my... The path where there is this information has more than 255 characters... Is there any way to fool excel and make it open a path with more than 255 chars?? |
Get text from a Html form
What you want may be opposite from other posts, but adapting existing code would be simple.
put data in web page: oIE.document.getElementById("someInput").value = someVariable get data from web page: someVariable = oIE.document.getElementById("someInput").value Not so tricky. -- Tim Williams Palo Alto, CA "josuegm" wrote in message oups.com... Man, I did what you told me to do, but the great majority of posts are about sending data from Excel to a web page... And what I want is exactly the opposite... There's an evil witch flying around my purposes... Goddamn... I found out a way to get the same information from the website, and this one is not placed in a HTML Form... But, oh my... The path where there is this information has more than 255 characters... Is there any way to fool excel and make it open a path with more than 255 chars?? |
All times are GMT +1. The time now is 02:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com