In the following macro a value shows in cell A61 when theworkbook opens 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
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