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: 77
Default Inputting info in webform from excel vba

Hello All,

Problem: I can't input data through excel userform in one page of a website
(a ssn field). But I am able to put in my uname and pw to get into that site.

Explanation: Through an excel userform, I access a website that asks for
username and password, submit buttons, and moves to another webpage that has
another field that I can't seem to enter data in (from excel). I'm hoping
that it's something simple that I'm missing.

Referenced Code:
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
With ie
ie.Visible = True

..Navigate "https:blahblahblah/login.jsp"

Do While ie.Busy And Not ie.ReadyState = 4:
Application.Wait (Now + TimeValue("0:00:02"))
DoEvents
Loop

ie.Document.all("username").Value = "myusername"
ie.Document.all("password").Value = "mypw"

ie.Document.forms(0).submit

Do While ie.Busy And Not ie.ReadyState = 4:
Application.Wait (Now + TimeValue("0:00:02"))
DoEvents
Loop

..Navigate "http:tothenextwebpagebecauseicantfigureouthowtofi ndclicklink"
Do While ie.Busy And Not ie.ReadyState = 4:
Application.Wait (Now + TimeValue("0:00:02"))
DoEvents
Loop

ie.Document.forms("ZZForm").ssn.Value = "someonesssn"

Other info:
After viewing the source code it appears that the 'Form' name of this part
of a webpage is labeled "ZZForm". In that 'form' is a textbox that appears to
be labeled "ssn". I am not familiar with html or web-based languages. I keep
seeing in the 'source code' "ZZForm.ssn.value".

I am trying to input a person's ssn in order to view update edit etc...
their records.
The error I keep getting is "Object variable or with variable not set". I
can't seem to figure out where I am making a mistake. I believe it may be
with the way I am labeling (or mislabeling) objects. Or something I need to
set.

I have been able to access/update/edit all of this using sendkeys, but as
you know it's not dependable.

Thanks for your help.

 
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
Webform Archie[_2_] Excel Programming 0 August 13th 06 09:51 AM
Newbie - needing advice on formatting webform data antfarm Excel Discussion (Misc queries) 6 July 14th 05 12:38 PM
inputting text on Word document using excel [email protected] Excel Programming 1 June 6th 05 02:14 PM
Help for excel webform Ken[_18_] Excel Programming 0 May 18th 04 10:37 AM
How to open new window in excel webform Ken[_18_] Excel Programming 0 May 17th 04 04:10 AM


All times are GMT +1. The time now is 01:36 PM.

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"