I wrote Excel code that opens up IE and navigates to a webpage on an intranet. This web page has input boxes where numbers are entered.
Is this even possible?
Maybe. What I’m picturing is writing a macro that will take the values from the Excel sheet and translate that into hyperlink data. The macro would build the hyperlink on the fly, so to speak.
I haven’t done anything like this so it may not work. On the other hand it just may…
If you open your browser and fill in the input boxes and hit Enter or click some kind of “OK” button…
does your browser end up going to an URL that looks vaguely like this?
If so, use Excel’s calcs to assemble the final URL and bypass the page with the input boxes altogether.
(an example being Lycos Maps. you can have a FileMaker database go directly to a map of an address entered in a database by compiling the proper map URL)
Hmmph! vBulletin, trying to be helpful, shortened the URL as it appears in the post. Hover over it with your mouse and examine the associated URL to see what I typed.
After more research I have found out the following:
An HTML page can send information through two methods, POST and GET.
The GET method is actually sort of easy and resembles what AHunter3 refers to. I used Excel to get to that page. Thanks!
Now, the POST method sends data to the server from the webpage and you have to reference each named control and its value in a POST command from Excel.
So that’s where I’m stuck. How can I pass values to a control that is named the same but appears on the webpage a number of times?
Just put the name in once for each value with that name. Like this:
<input type=hidden name=“hidpl0” value="" >
<input type=“text” name=“pl0” size=11 maxlength=8 style=“text-align:right;” value=“63284”
onkeypress=CaptureKeypress() onfocus=this.select(); onclick=“this.focus();this.select();” onchange=“setHiddenPLValue(0, 6)” onkeyup=“getLastChangedFldName(this,6);setHiddenPLValueFor0(0, 6, this);getRowTotal(0);getColumnTotal(0, 6)” onblur=“checkValue(this);”
What I need to do is send a new value to replace the 63284.