ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   IE User Name and Password message box (https://www.excelbanter.com/excel-programming/319629-ie-user-name-password-message-box.html)

James W.[_2_]

IE User Name and Password message box
 
When controlling IE from excel I am unable to select 'OK' for a login screen
I get when entering a intranet page. Any suggestion as to why send keys
won't work. I am guessing that I need to set the focus to that window before
I use the send key command. Any suggestions.
Thanks in advance

galimi[_2_]

IE User Name and Password message box
 
Don't use SendKeys to send commands to IE, rather, make a connection the the
Microsoft Internet Explorer Object progrmattically. You can then use the
Document Object Model to send info. to text boxes and click links and buttons.

Following is code you could include in a module

Dim ie As New SHDocVw.InternetExplorer

Set ie = New InternetExplorer

ie.Navigate "http://IntranetSite" 'Set the address of your Intranet site
ie.Visible = True

You can then use the ie.Document collection to pass information to Text
Boxes and click links and buttons

http://www.ingenio.com/categories/ca...sp?sid=5228306

"James W." wrote:

When controlling IE from excel I am unable to select 'OK' for a login screen
I get when entering a intranet page. Any suggestion as to why send keys
won't work. I am guessing that I need to set the focus to that window before
I use the send key command. Any suggestions.
Thanks in advance


James W.[_2_]

IE User Name and Password message box
 
I would like to do this but I don't know the name of the document to select
the 'OK' button. When right clicking I cannot view source because it is a
log in screen. Any suggestions


"galimi" wrote:

Don't use SendKeys to send commands to IE, rather, make a connection the the
Microsoft Internet Explorer Object progrmattically. You can then use the
Document Object Model to send info. to text boxes and click links and buttons.

Following is code you could include in a module

Dim ie As New SHDocVw.InternetExplorer

Set ie = New InternetExplorer

ie.Navigate "http://IntranetSite" 'Set the address of your Intranet site
ie.Visible = True

You can then use the ie.Document collection to pass information to Text
Boxes and click links and buttons

http://www.ingenio.com/categories/ca...sp?sid=5228306

"James W." wrote:

When controlling IE from excel I am unable to select 'OK' for a login screen
I get when entering a intranet page. Any suggestion as to why send keys
won't work. I am guessing that I need to set the focus to that window before
I use the send key command. Any suggestions.
Thanks in advance


Shetty

IE User Name and Password message box
 
James,
You may like to haave a look at "Web browser question" topic. Sharad
has given a solution there which may help you.

Regards,
Shetty



All times are GMT +1. The time now is 06:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com