View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
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