Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Help with Posting Login to webpage from VBA

I have been working on this for a while and still having problems with
the code. I am attempting to complete a login page (not a message box)
that's on an asp webpage.

My problem is that I can get to the webpage, but seem to be unable to
login. My question is ... utilizing the IE object property where can I
locate the location of the text boxes to be filled? I have looked in
the document.documentElement.innerText but am unable to locate it. I've
tried utilizing both IE and XML but don't have a clue. Please help
someone.
Below is a snipit of my code...

Dim XML As XMLHTTP40
Dim abytPostData() As Byte
Dim sMode As String
Dim sResponse As String
Dim nStartPos As Integer
Dim nEndPos As Integer

Set IE = New InternetExplorer
abytPostData =
StrConv("Userid=blah&Password=password&Login=yes&m l=https://" & _
"ptlogin.asp?Login=Login;" & _

"menu_param=ptloginok.asp&yes=&   Y ES   "
& _
"bypass_oe=false", vbFromUnicode)

With IE
.Visible = True
.Silent = False
.navigate "https://ptlogin.asp?Login=Login;"
Do Until Not .Busy
DoEvents
Loop

nFile = FreeFile
Open "D:\Eagle\login.txt" For Output Shared As 1

Debug.Print 1, .document.documentElement.innerText
Close 1

Set XML = New XMLHTTP40
With XML
.Open "POST", _
"https://sits4/ptdev/ptloginok.asp"
.setRequestHeader "Content-Type", _
"application/x-www-form-urlencoded"
.send abytPostData
sResponse = .responseText



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
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
the owner of posting should be able to delete the posting Mahendra Excel Discussion (Misc queries) 7 August 8th 05 07:21 PM
Login Help!!! TMO[_6_] Excel Programming 1 February 8th 04 03:09 PM
Login Box help Bill Lunney Excel Programming 0 August 20th 03 11:45 AM
Login Screen Jay[_10_] Excel Programming 1 August 18th 03 09:28 AM
Login Box Tom Ogilvy Excel Programming 0 August 8th 03 01:42 PM


All times are GMT +1. The time now is 05:35 AM.

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

About Us

"It's about Microsoft Excel"