![]() |
AppActivate for IE not working
I'm trying to use AppActivate for IE and it's intermittently working. I've
got things dimensioned as follows Dim myIE As SHDocVw.InternetExplorer How do I activate the IE window so that it works all of the time? Thanks, Barb Reinhardt |
AppActivate for IE not working
Here is some typical code that:
1. creates an IE object 2. does some simple tailoring 3. opens CNN 4. returns to the worksheet 5. allows the refresh of the website Sub Launch_IE() Set ie = CreateObject("InternetExplorer.Application") ie.AddressBar = False ie.MenuBar = False ie.Toolbar = False ie.Width = 610 ie.Height = 700 ie.Left = 0 ie.Top = 0 ie.navigate "http://www.cnn.com" ie.resizable = True ie.Visible = True ActiveSheet.Activate MsgBox ("ready to refresh??") AppActivate ie SendKeys "{F5}" DoEvents End Sub -- Gary''s Student - gsnu200838 "Barb Reinhardt" wrote: I'm trying to use AppActivate for IE and it's intermittently working. I've got things dimensioned as follows Dim myIE As SHDocVw.InternetExplorer How do I activate the IE window so that it works all of the time? Thanks, Barb Reinhardt |
AppActivate for IE not working
What do these two lines do
SendKeys "{F5}" DoEvents "Gary''s Student" wrote: Here is some typical code that: 1. creates an IE object 2. does some simple tailoring 3. opens CNN 4. returns to the worksheet 5. allows the refresh of the website Sub Launch_IE() Set ie = CreateObject("InternetExplorer.Application") ie.AddressBar = False ie.MenuBar = False ie.Toolbar = False ie.Width = 610 ie.Height = 700 ie.Left = 0 ie.Top = 0 ie.navigate "http://www.cnn.com" ie.resizable = True ie.Visible = True ActiveSheet.Activate MsgBox ("ready to refresh??") AppActivate ie SendKeys "{F5}" DoEvents End Sub -- Gary''s Student - gsnu200838 "Barb Reinhardt" wrote: I'm trying to use AppActivate for IE and it's intermittently working. I've got things dimensioned as follows Dim myIE As SHDocVw.InternetExplorer How do I activate the IE window so that it works all of the time? Thanks, Barb Reinhardt |
AppActivate for IE not working
In my little demo, once IE has been activated, I wanted to refresh the page.
The SendKeys is like touching the F5 key in IE (it refreshes the window). The DoEvents gives focus back to IE to accept this keystroke. -- Gary''s Student - gsnu200838 "Barb Reinhardt" wrote: What do these two lines do SendKeys "{F5}" DoEvents "Gary''s Student" wrote: Here is some typical code that: 1. creates an IE object 2. does some simple tailoring 3. opens CNN 4. returns to the worksheet 5. allows the refresh of the website Sub Launch_IE() Set ie = CreateObject("InternetExplorer.Application") ie.AddressBar = False ie.MenuBar = False ie.Toolbar = False ie.Width = 610 ie.Height = 700 ie.Left = 0 ie.Top = 0 ie.navigate "http://www.cnn.com" ie.resizable = True ie.Visible = True ActiveSheet.Activate MsgBox ("ready to refresh??") AppActivate ie SendKeys "{F5}" DoEvents End Sub -- Gary''s Student - gsnu200838 "Barb Reinhardt" wrote: I'm trying to use AppActivate for IE and it's intermittently working. I've got things dimensioned as follows Dim myIE As SHDocVw.InternetExplorer How do I activate the IE window so that it works all of the time? Thanks, Barb Reinhardt |
All times are GMT +1. The time now is 03:43 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com