Results 1 to 5 of 5

Need help with code that will build a URL

Threaded View

  1. #1
    Forum Contributor
    Join Date
    12-16-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2016 Preview
    Posts
    105

    Need help with code that will build a URL

    The goal is to be able to key in a date and have Excel import historical stock data. Right now, help is needed in setting up the variables in VBA (DIM, Set, etc) and building the URL.

    The stock: NKE
    Start date is March 19 2007
    End date: May 19 2007

    The resulting URL is:

    http: //finance.yahoo.com/q/hp?s=NKE&a=02&b=19&c=2007&d=04&e=19&f=2007&g=m

    Components of the URL

    NKE = stock ticker

    Start date
    02 = March (The months start with Jan = 00 thru Dec = 11)
    19 = day
    2007 = Year

    End Date
    04 = May
    19 = day
    2007 = year

    m = provide data by month (d = daily and w = weekly but I and going to stick with retrieving monthly data)

    How do I start this code in order to put 3/19/2007 into a single cell and have VBA build the URL with an end date automatically 2 months later?
    Last edited by Habanero Time; 02-17-2012 at 10:10 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1