LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Excel VBA to click 'submit' on form

I am scripting the input to an intranet website and am getting stuck at the
clicking submit button - despite trrying code samples from other posts and
boards...

essentially I am taking the value in cell A1, defining it as "base_url", and
navigating to that page. The script pulls in the IE page, waits for the load,
the password is entered successfully, and there's where it all ends where I
am trying to have a 'submit' event happen to the submit button. The button is
not named and everything runs fine up to the point of button click. Password
values pass thru no problem as when I manually click the button it navigates
to the next page...

I have tried, among other things in the code below:
..submit
..click

Sendkeys sequences
End With
..Visible = True
SendKeys "{TAB}", True
SendKeys "~", True


The text in the code:

input type=text name='orderID' value='370732'

is passed from the server upon URL navigation...
Still nothing. I am racking my brain - there's no reason I can think of for
this not to work. The "Click Submit" bolded below is where it hangs...

Thanks MUCH!

Coding below



code from the server:
--------------------------------------------------------------------------------
<FORM ACTION='' method='POST'
<table<tr
<td<bEnter The Server Password: </b</td
<td align=left<input type='password' name='password'</td</tr
<tr
<td<bEnter The Filename</b</td
<td align=left<input type=text name='orderID' value='370732'</td</tr
<tr<td</td<td align=center<input type='Submit' value='Submit'
</td</tr</table
</FORM
</body
</html
--------------------------------------------------------------------------------


--- VB Script ---

Sub process_item()

Sheets("input").Select

base_url = Cells(1, 1).Value


Range("A1").Select

Dim url As String

url = base_url

Dim ie As Object
'Dim document As Object
Set ie = CreateObject("internetexplorer.application")
With ie
..Visible = True
..Navigate base_url
Do While .ReadyState < 4
DoEvents
Loop

With .document.all
..Password.Value = "password123"
(This is where I hang up)
-- CLICK SUBMIT <--


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to automatically fill and submit (in batch) an online form fromdata in a excel sheet??? Christophe[_2_] Excel Discussion (Misc queries) 0 December 20th 07 07:57 AM
saveto or Submit Form functionality in Excel MLyons10 Excel Worksheet Functions 0 March 29th 06 05:47 PM
Form Input--Submit evangray123 Excel Programming 3 June 16th 05 11:34 PM
Form with submit button Hooter Excel Worksheet Functions 0 June 8th 05 07:12 PM
I wanta infopath form to submit data to an excel databse file uCHE Excel Discussion (Misc queries) 0 April 26th 05 05:56 PM


All times are GMT +1. The time now is 06:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"