Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default username and password controls


I was working on this with Joel earlier.
I have the following code which is barfing on ipf.Value = username
When I look at the html code for this page the username tag is name and the
password tag is id. The code is barfing when I try to set the value for the
username tag. any help below is appreciated.

Public Sub Login()

'Dim ipf As Object
Dim username As String
Dim pass As String
username = "vvv"
pass = "vvv"

Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "www.elliottwave.com/"
Do While ie.ReadyState < 4 And ie.Busy = True
DoEvents
Loop
Set Form = ie.Document.getElementsByTagname("Form")
Set GoButton = Form(0).onsubmit

Set ipf = ie.Document.getElementByID("name")
ipf.Value = username
Set ipf = ie.Document.getElementByID("id")
ipf.Value = pass
Set ipf = ie.Document.all.Item("global_login_loginbutton")
Do Until .ReadyState = 4
DoEvents
Loop
ipf.submit

End With

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Statistics

Sorry for borrowing this post, somehow I cannot start a new question here. I
posted the same question in the forum earlier. However, I'm afraid that I
cannot find it now.

I have some panel data in a excel file. Column A shows the names of firms.
There are 800 firms and each firms data from 1988 to 2005. It is listed as
blow.
Name Year SD
A23 1988 NA
A23 1989 NA
A23 1990 NA
A23 1991 NA
A23 1992 NA
A23 1993 0
A23 1994 0
A23 1995 0
A23 1996 0.748
A23 1997 0.792
A23 1998 NA
A23 1999 NA
A23 2000 NA
A23 2001 NA
A23 2002 NA
A23 2003 0
A23 2004 0
A23 2005 0
A25 1988 NA
A25 1989 NA
A25 1990 NA
A25 1991 NA
A25 1992 NA
A25 1993 NA
A25 1994 NA
A25 1995 NA
A25 1996 NA
A25 1997 NA
A25 1998 NA
A25 1999 NA
A25 2000 0
A25 2001 0.0266
A25 2002 0.0262
A25 2003 0
A25 2004 0
A25 2005 0.0267
€¦ €¦ €¦
I need to find out 1) how many €˜0s are there in my dataset? How many firms
are these €˜0s in? 2) how many €˜NA are in my dataset? How many firms are
these €˜NA in? 3) After excluding records which are €˜NA or €˜0, how many
firms have more than 5 year continuous records? I wrote some codes for the
1st question below, but it didnt work. Please help and many thanks!

Const STAR_ROW = 2
Const END_ROW = 15401
Const TARGET_SHEET = "Sheet1"


Sub dl()
Dim ws As Worksheet
Dim s1 As String
Dim i, j, k As Integer

Set ws = ThisWorkbook.Sheets(TARGET_SHEET)

For i = STA_ROW To END_ROW Step 1
i = 1
n = 0
For j = i To (i + 17) Step 1
s1 = (ws.Cells(j, 3).Value)
If s1 = "0" Then
n = n + 1
ws.Cells(15402, 3).Value = Str(k)
End If
i = i + 17
i = i
Next
Next

End Sub


"thomas donino" wrote:


I was working on this with Joel earlier.
I have the following code which is barfing on ipf.Value = username
When I look at the html code for this page the username tag is name and the
password tag is id. The code is barfing when I try to set the value for the
username tag. any help below is appreciated.

Public Sub Login()

'Dim ipf As Object
Dim username As String
Dim pass As String
username = "vvv"
pass = "vvv"

Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "www.elliottwave.com/"
Do While ie.ReadyState < 4 And ie.Busy = True
DoEvents
Loop
Set Form = ie.Document.getElementsByTagname("Form")
Set GoButton = Form(0).onsubmit

Set ipf = ie.Document.getElementByID("name")
ipf.Value = username
Set ipf = ie.Document.getElementByID("id")
ipf.Value = pass
Set ipf = ie.Document.all.Item("global_login_loginbutton")
Do Until .ReadyState = 4
DoEvents
Loop
ipf.submit

End With

End Sub

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
Username and password login. Moh Excel Programming 10 December 21st 07 03:36 PM
Password/UserName Gordon[_15_] Excel Programming 1 January 19th 07 09:04 AM
Web Query: Username and Password. Sharad Naik Excel Programming 0 December 16th 04 09:43 AM
username & password check Jack Excel Programming 5 October 8th 04 03:20 PM
creating a username and password box kil Excel Programming 1 May 20th 04 08:20 AM


All times are GMT +1. The time now is 09:33 PM.

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"