Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Macro to go a WEB site and enter a password

Can a VBA macro be written to:



1.. Go to a web site
2.. Enter the user code (i.e., the macro types it, not the user)
3.. Enter the password (i.e., the macro types it, not the user)
What would the SUB look like?



Any help would be much appreciated.



BobB


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro to go a WEB site and enter a password

Try a URL like:
http://username:password@URL

sometimes this works, but apparently there is no standard for passing in a
username and password.

--
Regards,
Tom Ogilvy


Bob Benjamin wrote in message
...
Can a VBA macro be written to:



1.. Go to a web site
2.. Enter the user code (i.e., the macro types it, not the user)
3.. Enter the password (i.e., the macro types it, not the user)
What would the SUB look like?



Any help would be much appreciated.



BobB




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default Macro to go a WEB site and enter a password

Here's an example of a way to login automatically. Each website is going to
be different, with different forms and names--the trick is to match the form
names with what they do and then utilize their properties to enter
information in the right spots and click the right button. This procedure
lists the name of each form, which is a good way to start, as the names give
a good idea of what the form does. And then it logs you in to the Yahoo
Message boards server.

HTH,
Shockley


Sub Login()
sURL =
"http://edit.my.yahoo.com/config/login?.src=mb&.done=http%3a//messages.yahoo
..com/bbs%3f.mm=FN%26action=r%26board=4687440%26tid=ener %26sid=4687440%26mid=
0&lg=us&.intl=us"
Dim IE As New InternetExplorer
IE.navigate sURL
While (IE.Busy)
DoEvents
Wend
Do
On Error Resume Next
Set htm = IE.Document
Err = 0
If Not htm Is Nothing Then Exit Do
Loop
Do
Set frms = htm.forms(0)
If Not frms Is Nothing Then Exit Do
Loop

IE.Visible = True

For i = 1 To frms.Length
Set frm = frms(i - 1)
Cells(i, 1) = frm.Name
Next i

For i = 1 To frms.Length
Set frm = frms(i - 1)
sTest = frm.Name
If sTest = "login" Then
frm.Value = "myusername"
End If
If sTest = "passwd" Then
frm.Value = "mypassword"
End If
If sTest = ".save" Then
frm.Click
End If
Next i

Set oDoc = Nothing
Set IE = Nothing

End Sub




"Bob Benjamin" wrote in message
...
Can a VBA macro be written to:



1.. Go to a web site
2.. Enter the user code (i.e., the macro types it, not the user)
3.. Enter the password (i.e., the macro types it, not the user)
What would the SUB look like?



Any help would be much appreciated.



BobB




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default Macro to go a WEB site and enter a password

PS, to run the macro you will have to add a reference for "Microsoft
Internet Controls". In the VB Editor, click

Tools | References

and then scroll down to find "Microsoft Internet Controls" and put a check
in the box and click OK.

Shockley


"shockley" wrote in message
...
Here's an example of a way to login automatically. Each website is going

to
be different, with different forms and names--the trick is to match the

form
names with what they do and then utilize their properties to enter
information in the right spots and click the right button. This procedure
lists the name of each form, which is a good way to start, as the names

give
a good idea of what the form does. And then it logs you in to the Yahoo
Message boards server.

HTH,
Shockley


Sub Login()
sURL =

"http://edit.my.yahoo.com/config/login?.src=mb&.done=http%3a//messages.yahoo

..com/bbs%3f.mm=FN%26action=r%26board=4687440%26tid=ener %26sid=4687440%26mid=
0&lg=us&.intl=us"
Dim IE As New InternetExplorer
IE.navigate sURL
While (IE.Busy)
DoEvents
Wend
Do
On Error Resume Next
Set htm = IE.Document
Err = 0
If Not htm Is Nothing Then Exit Do
Loop
Do
Set frms = htm.forms(0)
If Not frms Is Nothing Then Exit Do
Loop

IE.Visible = True

For i = 1 To frms.Length
Set frm = frms(i - 1)
Cells(i, 1) = frm.Name
Next i

For i = 1 To frms.Length
Set frm = frms(i - 1)
sTest = frm.Name
If sTest = "login" Then
frm.Value = "myusername"
End If
If sTest = "passwd" Then
frm.Value = "mypassword"
End If
If sTest = ".save" Then
frm.Click
End If
Next i

Set oDoc = Nothing
Set IE = Nothing

End Sub




"Bob Benjamin" wrote in message
...
Can a VBA macro be written to:



1.. Go to a web site
2.. Enter the user code (i.e., the macro types it, not the user)
3.. Enter the password (i.e., the macro types it, not the user)
What would the SUB look like?



Any help would be much appreciated.



BobB






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Macro to go a WEB site and enter a password

Wow! I am impressed and pleased how you guys keep coming up with
all these brillant solutions.

Thanks.
Bob
"shockley" wrote in message
...
PS, to run the macro you will have to add a reference for "Microsoft
Internet Controls". In the VB Editor, click

Tools | References

and then scroll down to find "Microsoft Internet Controls" and put a check
in the box and click OK.

Shockley


"shockley" wrote in message
...
Here's an example of a way to login automatically. Each website is

going
to
be different, with different forms and names--the trick is to match the

form
names with what they do and then utilize their properties to enter
information in the right spots and click the right button. This

procedure
lists the name of each form, which is a good way to start, as the names

give
a good idea of what the form does. And then it logs you in to the Yahoo
Message boards server.

HTH,
Shockley


Sub Login()
sURL =


"http://edit.my.yahoo.com/config/login?.src=mb&.done=http%3a//messages.yahoo


..com/bbs%3f.mm=FN%26action=r%26board=4687440%26tid=ener %26sid=4687440%26mid=
0&lg=us&.intl=us"
Dim IE As New InternetExplorer
IE.navigate sURL
While (IE.Busy)
DoEvents
Wend
Do
On Error Resume Next
Set htm = IE.Document
Err = 0
If Not htm Is Nothing Then Exit Do
Loop
Do
Set frms = htm.forms(0)
If Not frms Is Nothing Then Exit Do
Loop

IE.Visible = True

For i = 1 To frms.Length
Set frm = frms(i - 1)
Cells(i, 1) = frm.Name
Next i

For i = 1 To frms.Length
Set frm = frms(i - 1)
sTest = frm.Name
If sTest = "login" Then
frm.Value = "myusername"
End If
If sTest = "passwd" Then
frm.Value = "mypassword"
End If
If sTest = ".save" Then
frm.Click
End If
Next i

Set oDoc = Nothing
Set IE = Nothing

End Sub




"Bob Benjamin" wrote in message
...
Can a VBA macro be written to:



1.. Go to a web site
2.. Enter the user code (i.e., the macro types it, not the user)
3.. Enter the password (i.e., the macro types it, not the user)
What would the SUB look like?



Any help would be much appreciated.



BobB










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default Macro to go a WEB site and enter a password

It's all pretty basic stuff, but it's nice to be appreciated <g.

Regards,
Shockley


"Bob Benjamin" wrote in message
...
Wow! I am impressed and pleased how you guys keep coming up with
all these brillant solutions.

Thanks.
Bob
"shockley" wrote in message
...
PS, to run the macro you will have to add a reference for "Microsoft
Internet Controls". In the VB Editor, click

Tools | References

and then scroll down to find "Microsoft Internet Controls" and put a

check
in the box and click OK.

Shockley


"shockley" wrote in message
...
Here's an example of a way to login automatically. Each website is

going
to
be different, with different forms and names--the trick is to match

the
form
names with what they do and then utilize their properties to enter
information in the right spots and click the right button. This

procedure
lists the name of each form, which is a good way to start, as the

names
give
a good idea of what the form does. And then it logs you in to the

Yahoo
Message boards server.

HTH,
Shockley


Sub Login()
sURL =



"http://edit.my.yahoo.com/config/login?.src=mb&.done=http%3a//messages.yahoo



..com/bbs%3f.mm=FN%26action=r%26board=4687440%26tid=ener %26sid=4687440%26mid=
0&lg=us&.intl=us"
Dim IE As New InternetExplorer
IE.navigate sURL
While (IE.Busy)
DoEvents
Wend
Do
On Error Resume Next
Set htm = IE.Document
Err = 0
If Not htm Is Nothing Then Exit Do
Loop
Do
Set frms = htm.forms(0)
If Not frms Is Nothing Then Exit Do
Loop

IE.Visible = True

For i = 1 To frms.Length
Set frm = frms(i - 1)
Cells(i, 1) = frm.Name
Next i

For i = 1 To frms.Length
Set frm = frms(i - 1)
sTest = frm.Name
If sTest = "login" Then
frm.Value = "myusername"
End If
If sTest = "passwd" Then
frm.Value = "mypassword"
End If
If sTest = ".save" Then
frm.Click
End If
Next i

Set oDoc = Nothing
Set IE = Nothing

End Sub




"Bob Benjamin" wrote in message
...
Can a VBA macro be written to:



1.. Go to a web site
2.. Enter the user code (i.e., the macro types it, not the user)
3.. Enter the password (i.e., the macro types it, not the user)
What would the SUB look like?



Any help would be much appreciated.



BobB










  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to go a WEB site and enter a password

There are several different approaches that can be used ...you need to be a
bit more specific about what you're looking to do.

For example I have several spreadsheets where source data is extracted
automatically from a secure area of a web site.

Regards
Robert Hind
"Bob Benjamin" wrote in message
...
Can a VBA macro be written to:



1.. Go to a web site
2.. Enter the user code (i.e., the macro types it, not the user)
3.. Enter the password (i.e., the macro types it, not the user)
What would the SUB look like?



Any help would be much appreciated.



BobB




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default Macro to go a WEB site and enter a password

Do you have an alternative method for the web server I used as an example,
i.e., Yahoo Message boards,

http://login.yahoo.com/config/login?...oo.com&.src=mb

Any other interesting techniques you care to outline would be
appreciated-always looking to expand my horizons.

Shockley


"Robert Hind" wrote in message
...
There are several different approaches that can be used ...you need to be

a
bit more specific about what you're looking to do.

For example I have several spreadsheets where source data is extracted
automatically from a secure area of a web site.

Regards
Robert Hind
"Bob Benjamin" wrote in message
...
Can a VBA macro be written to:



1.. Go to a web site
2.. Enter the user code (i.e., the macro types it, not the user)
3.. Enter the password (i.e., the macro types it, not the user)
What would the SUB look like?



Any help would be much appreciated.



BobB






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
Password to enter the sheet Tia[_3_] Excel Worksheet Functions 6 October 13th 08 10:37 PM
Importing Web Data into Excel from a Password Site XL Baby Setting up and Configuration of Excel 0 May 6th 07 03:16 AM
How to see macro code of a password protected macro without a password? Dmitry Kopnichev Excel Worksheet Functions 5 October 27th 05 09:57 AM
one line macro to enter password for workbook N Lenox Excel Programming 5 October 29th 03 08:36 PM
Save to FTP site through a macro L Monetti Excel Programming 0 July 29th 03 03:17 PM


All times are GMT +1. The time now is 07:27 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"