I'm running the following macro (below)
In this macro I'm doing an Interent search once, Then getting the result.
Then in this same macro, I'm calling the same website a second time. and attempting
to get the second result.
My result is showing the result of the first request, then the same result for the second search.
Question is, Do I need to remove the first result before I attempt to get the second result,
and if so "HOW" or
Do I need to get the result of the second search as a second response to the search, that is
the answer for the second search is the "Second" answer is a LIST of results, and again,
if so, " HOW".
Sub Macro1()
'
' Macro1 Macro
'
'
Sheets("correl"). Select
Dim nnn As String
Dim loc As String
For i = 12 Two 13
nnn = Cells(i, 1)
loc = Cells(i, 2)
Dim ie As Object
Set ie = CreateObject("INTERNETEXPLORER. APPLICATION")
ie. NAVIGATE "www.google.com/finance/quote/" + nnn + ":" + place
ie. Visible = False
While ie.busy
DoEvents
Wend
' Application.WindowState = x1Normal
Range(Cells(i, 13), Cells(i, 13)). Select
ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:= _
False
With Selection.Font
. Name = "calibri"
. Size = 11
. Strikethrough = False
. Superscript = False
. Subscript = False
. OutlineFont = False
. Shadow = False
' . Underline = x1UnderlineStyleNone
' . ThemeColor = x1ThemeColorLight1
. TintAndShade = 0
. ThemeFont = x1ThemeFontMinor
End With
Next i
End Sub
Sample of list of stocks.
From Art Long
Thanks
In this macro I'm doing an Interent search once, Then getting the result.
Then in this same macro, I'm calling the same website a second time. and attempting
to get the second result.
My result is showing the result of the first request, then the same result for the second search.
Question is, Do I need to remove the first result before I attempt to get the second result,
and if so "HOW" or
Do I need to get the result of the second search as a second response to the search, that is
the answer for the second search is the "Second" answer is a LIST of results, and again,
if so, " HOW".
Sub Macro1()
'
' Macro1 Macro
'
'
Sheets("correl"). Select
Dim nnn As String
Dim loc As String
For i = 12 Two 13
nnn = Cells(i, 1)
loc = Cells(i, 2)
Dim ie As Object
Set ie = CreateObject("INTERNETEXPLORER. APPLICATION")
ie. NAVIGATE "www.google.com/finance/quote/" + nnn + ":" + place
ie. Visible = False
While ie.busy
DoEvents
Wend
' Application.WindowState = x1Normal
Range(Cells(i, 13), Cells(i, 13)). Select
ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:= _
False
With Selection.Font
. Name = "calibri"
. Size = 11
. Strikethrough = False
. Superscript = False
. Subscript = False
. OutlineFont = False
. Shadow = False
' . Underline = x1UnderlineStyleNone
' . ThemeColor = x1ThemeColorLight1
. TintAndShade = 0
. ThemeFont = x1ThemeFontMinor
End With
Next i
End Sub
Sample of list of stocks.
A | NYSE | |
T | NYSE | |
C | NYSE | |
INTC | NASDAQ |
From Art Long
Thanks