Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default launch internet explorer from excel

i use the following code to launch Internet Explorer from excel. It works.
Problem is after the page is open i want to refresh the window automatically.
how to do that??


Sub LaunchIE_FSA_11()

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.nseindia.com/marketinfo/equities/cmquote_tab.jsp?key=GAILEQN&symbol=GAIL&flag=0"
ie.resizable = True
ie.Visible = True
End Sub

ie.Refresh = True, does not work. please help. TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default launch internet explorer from excel

There is probably some kind of refresh Method in the IE Object Model, but
here is a way to have VBA do what the user does: touch F5 in IE for a
refresh:

Sub LaunchIE_FSA_11()

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

MsgBox ("ready to refresh??")
AppActivate ie
SendKeys "{F5}"
DoEvents
End Sub
--
Gary''s Student - gsnu200796


"Pradip Jain" wrote:

i use the following code to launch Internet Explorer from excel. It works.
Problem is after the page is open i want to refresh the window automatically.
how to do that??


Sub LaunchIE_FSA_11()

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.nseindia.com/marketinfo/equities/cmquote_tab.jsp?key=GAILEQN&symbol=GAIL&flag=0"
ie.resizable = True
ie.Visible = True
End Sub

ie.Refresh = True, does not work. please help. TIA

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default launch internet explorer from excel

although it works, not a very neat solution.

anybody else has a better alternative - please help

"Gary''s Student" wrote:

There is probably some kind of refresh Method in the IE Object Model, but
here is a way to have VBA do what the user does: touch F5 in IE for a
refresh:

Sub LaunchIE_FSA_11()

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

MsgBox ("ready to refresh??")
AppActivate ie
SendKeys "{F5}"
DoEvents
End Sub
--
Gary''s Student - gsnu200796


"Pradip Jain" wrote:

i use the following code to launch Internet Explorer from excel. It works.
Problem is after the page is open i want to refresh the window automatically.
how to do that??


Sub LaunchIE_FSA_11()

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.nseindia.com/marketinfo/equities/cmquote_tab.jsp?key=GAILEQN&symbol=GAIL&flag=0"
ie.resizable = True
ie.Visible = True
End Sub

ie.Refresh = True, does not work. please help. TIA

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default launch internet explorer from excel

I agree, it is not very neat.

How about just repeating the Navigate statement whenever you want to refresh??
--
Gary''s Student - gsnu200797


"Pradip Jain" wrote:

although it works, not a very neat solution.

anybody else has a better alternative - please help

"Gary''s Student" wrote:

There is probably some kind of refresh Method in the IE Object Model, but
here is a way to have VBA do what the user does: touch F5 in IE for a
refresh:

Sub LaunchIE_FSA_11()

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

MsgBox ("ready to refresh??")
AppActivate ie
SendKeys "{F5}"
DoEvents
End Sub
--
Gary''s Student - gsnu200796


"Pradip Jain" wrote:

i use the following code to launch Internet Explorer from excel. It works.
Problem is after the page is open i want to refresh the window automatically.
how to do that??


Sub LaunchIE_FSA_11()

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.nseindia.com/marketinfo/equities/cmquote_tab.jsp?key=GAILEQN&symbol=GAIL&flag=0"
ie.resizable = True
ie.Visible = True
End Sub

ie.Refresh = True, does not work. please help. TIA

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
launch from explorer in Vista - multiple instances of Excel Tim Childs[_3_] Excel Discussion (Misc queries) 5 July 30th 09 06:49 PM
Excel/VBA/Internet Explorer Alex[_30_] Excel Programming 1 November 22nd 05 05:09 PM
Can't launch downloadable Excel CSV files from internet explorer Jim Bud Excel Discussion (Misc queries) 0 June 30th 05 04:28 AM
Internet Explorer & Excel David Excel Programming 0 February 4th 05 08:51 PM
Can I control Internet Explorer using Excel VBA? JohnI Excel Programming 2 September 1st 03 12:21 AM


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