Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Username and password login. | Excel Programming | |||
Password/UserName | Excel Programming | |||
Web Query: Username and Password. | Excel Programming | |||
username & password check | Excel Programming | |||
creating a username and password box | Excel Programming |