+ Reply to Thread
Results 1 to 4 of 4

Web Query with Dynamic Date in the MIDDLE of the Url

  1. #1
    Registered User
    Join Date
    07-20-2013
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Web Query with Dynamic Date in the MIDDLE of the Url

    Hey everyone... Looking for some help on this one.. I'm trying to perform a web query that pulls a table from our companies intranet. I'm able to manually do this each day... however, the Url that my company uses is:

    http://www.companywebsite.com/cctpta...=KS7561&sDate=7/24/2013&mgrID=RE4832&hrchy=KS7561,RE4832,JG1819,VJ1963&region=-1&ordStatus=-1&mtd[0]=9830.00&daily[0]=212.00&mtd[1]=241767.00&daily[1]=10069.00&mtd[2]=0.00&daily[2]=0.00&mtd[3]=3528.00&daily[3]=0.00&mtd[4]=2506.00&daily[4]=0.00

    The problem is, the date updates each day. The rest of the URL is the same... just the Date changes. To have this pull every day..right now, i'm manually changing it.. (If only the company would label the dropdown "today"..).

    Anyway... I know there's a way to have this update..I'm just too new to VB to program it... Any tips would be GREAT! Thanks everyone!

  2. #2
    Forum Contributor ragavan.sridar1's Avatar
    Join Date
    11-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010, Excel 2003
    Posts
    208

    Re: Web Query with Dynamic Date in the MIDDLE of the Url

    are you doing this with a macro?

    if so, can you post your code here?
    Thanks!
    Raga.

    Please,mark your thread [SOLVED] if you received your answer.

    Click the little star * below, to give some Rep if you think an answer deserves it.

    I learnt so many things from these links.

  3. #3
    Registered User
    Join Date
    07-20-2013
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Web Query with Dynamic Date in the MIDDLE of the Url

    At this point... I'm just using a regular web query...and the macro is just refreshing these. And each day, I'm manually changing the "connection" settings to query the correct day.

  4. #4
    Registered User
    Join Date
    07-20-2013
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Web Query with Dynamic Date in the MIDDLE of the Url

    I guess another way that I can state the question...

    When I web Query this website:

    http://www.companywebsite.com/cctpta...=JC509T&sDate=7/26/2013&mgrID=KS7561&hrchy=JC509T,KS7561,RE4832,JG1819,VJ1963&region=-1&ordStatus=-1

    The Bold section (Today's date) is the "dynamic" portion of the url. This is the only parameter that changes from the address and it can be picked up from a predetermined cell. Either way, whichever is easier works for me. Does anyone have the scripting required so that I can manually type in today's date and have it automatically pull up the proper web query url?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] When file is opened, the row having current date scrolls to middle of screen
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-27-2013, 10:49 AM
  2. Extracting the Middle Initial/Middle Name
    By akwishestofish in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-16-2012, 11:13 AM
  3. [SOLVED] find date in middle of numbers and use it to calculate a cell value
    By CityInspector in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-26-2012, 11:16 AM
  4. [SOLVED] VBA to auto merge and middle align for particular row in dynamic range
    By cruise.alter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2012, 02:32 AM
  5. Dynamic Web Query
    By numbersdontlie12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2010, 10:55 PM

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