Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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

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
AppActivate problem paVBAuser Excel Programming 3 April 7th 08 05:21 PM
AppActivate BristolBloos Excel Programming 1 October 14th 05 01:01 PM
appactivate Philip Kopf Excel Programming 2 August 23rd 04 05:08 AM
appactivate Philip Kopf Excel Programming 3 August 23rd 04 05:06 AM
appactivate sendkeys not working with accelerator RB Smissaert Excel Programming 4 August 12th 03 08:31 PM


All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"