ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   launch internet explorer from excel (https://www.excelbanter.com/excel-programming/414851-launch-internet-explorer-excel.html)

Pradip Jain

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

Gary''s Student

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


Pradip Jain

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


Gary''s Student

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



All times are GMT +1. The time now is 09:25 PM.

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