+ Reply to Thread
Results 1 to 2 of 2

Macro with URL get query that references a cell for a date

  1. #1
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Macro with URL get query that references a cell for a date

    Hi
    I'm sure this is probably pretty simple, apologies

    I'm using a macro and URL Get query below. Rather than have my dates hard coded in the URL i would like the string to reference a cell in the spreadsheet

    I found some code in the forums but this part {ts '" & DT1 & "'} is not quite right, any help would be appreciated!


    Sub Update_WQ_3()
    '
    ' Update_WQ_3 Macro
    '
    '
    Dim DT1 As String

    DT1 = Format(Range("=Summary!B3").Value, _
    "YYYY-MM-DD")

    Sheets("RAW").Select
    Range("A1").Select
    With ActiveSheet.QueryTables.Add(Connection:= _
    "URL;https://api.cloud.com/report/usage?startDate={ts '" & DT1 & "'}", _
    Destination:=Range("$A$1"))

    Thanks
    Mike

  2. #2
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro with URL get query that references a cell for a date

    I've found that the string below gets the date in but drops part of the URL usage?startDate=

    "URL;https://api.cloud.com/report/usage?startDate=ts " & DT1 & "", _

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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