Cannot exract value on Google web site

farmock2

New Member
Joined
Oct 29, 2014
Messages
21
In the following macro a value shows in cell A61 when the workbookopens and remains until
line “Cells(D + 1,"A").Value = intPrice” is executed. It then disappears so no value isassigned to intPrice. Can anybody help with this problem? Thanks in advance forany assistance.
Sub Macro3()
Dim symBol As String
Dim intPrice As String
Dim pRice As Single
Dim D As Integer
Dim T As Integer
symBol = "GDX"
Workbooks.OpenFilename:= _ "https://www.google.com/search?newwindow=1&source=hp&ei=o6yaWqXSOITW5gK4prmIBA&q="& symBol &"&oq=gdx&gs_l=psy-ab.3..35i39k1j0i131i67k1j0i67k1l2j0i20i263k1j0j0i67k1j0l3.1975.2841.0.4149.4.3.0.0.0.0.80.233.3.3.0..2..0...1.1.64.psy-ab..1.3.232.0..0i131k1.0.I8JFR7A7pqU"
D = 1
Do
IfLeft(Cells(D, "A").Value, 8) = "NYSEARCA" Then
Cells(D + 1, "A").Value = intPrice
ExitDo
End If
D = D + 1
Loop Until D =1000
End Sub
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Watch MrExcel Video

Forum statistics

Threads
1,108,618
Messages
5,523,935
Members
409,543
Latest member
LaMaqu1na

This Week's Hot Topics

Top