Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-15-2016, 05:39 PM
xfer xfer is offline Macro Question Windows 7 32bit Macro Question Office 2007
Novice
Macro Question
 
Join Date: Dec 2016
Posts: 1
xfer is on a distinguished road
Default Macro Question

Hi guys. I came across this file online. I'm trying to do a similar project with this concept but I have no macro experience. Would anyone be able to share with me where did the macro pulls the information from yahoo finance? If I want it to pull from another site, how can I change it?

https://www.dropbox.com/s/4z7mg6o1iv...ting.xlsm?dl=0
Reply With Quote
  #2  
Old 01-07-2017, 01:48 PM
Logit Logit is offline Macro Question Windows 10 Macro Question Office 2007
Expert
 
Join Date: Jan 2017
Posts: 529
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

The URL link for pulling the info is located in this portion of the Routine Module:

Code:
 qurl = "http://ichart.finance.yahoo.com/table.csv?s=" & Symbol
        qurl = qurl & "&a=" & Month(StartDate) - 1 & "&b=" & Day(StartDate) & _
            "&c=" & Year(StartDate) & "&d=" & Month(EndDate) - 1 & "&e=" & _
            Day(EndDate) & "&f=" & Year(EndDate) & "&g=m" & Sheets("Data").Range("a1") & "&q=q&y=0&z=" & _
            Symbol & "&x=.csv"
                   
        qurlw = "http://ichart.finance.yahoo.com/table.csv?s=" & Symbol
        qurlw = qurlw & "&a=" & Month(FifteenYear) - 1 & "&b=" & Day(FifteenYear) & _
            "&c=" & Year(FifteenYear) & "&d=" & Month(LastYear) - 1 & "&e=" & _
            Day(LastYear) & "&f=" & Year(LastYear) & "&g=w" & Sheets("Data2").Range("a1") & "&q=q&y=0&z=" & _
            Symbol & "&x=.csv"
The beginning of the URL has been highlighted in RED.

If you change this portion of the code, the project will be redirected to the new URL.

Why does YAHOO FINANCE only provide data up to Dec 2015 ? Shouldn't there be data for 2016 as well ?
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Question Question: Regarding Macro/VBA rasheed Excel Programming 1 07-24-2016 01:33 AM
Macro Question Word macro question mpd Word VBA 4 08-29-2015 08:38 AM
Macro Question Macro Question: Need help making a macro to highlight the first word in every sentence LadyAna Word 1 12-06-2014 10:39 PM
Macro Question Macro Needed to Insert Asnwer to A Question in Multiple Choice Format Question rsrasc Word VBA 7 03-28-2014 12:28 PM
Macro Question Macro question PaulY Word VBA 1 12-22-2010 11:21 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:18 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft