Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

simple question

  Asked By: Bogart    Date: Nov 17    Category: MS Office    Views: 668
  


The following code is trying to download data from a website into a spreadsheet:

Sub Book2()

Dim frequency As String, frequencyconversion As String, nacode As String,
startdate As Date, enddate As Date, MMDateStartArray As Variant

Dim calendar1 As String, dateformat As String, dataorder As String,
TempDateTotal As Long, Values(1 To 20), TodayDate As Date, Transpose As Variant

On Error Resume Next

'constants
startdate = 6 / 13 / 2002
enddate = "Today"
frequency = "FREQ_DAY"
frequencyconversion = "CONV_FIRSTBUS_ABS"
nacode = "NA_NOTHING"
calendar1 = "CAL_USBANK"
dateformat = "DATES_IN_ROWS"
dataorder = "DO_ASCENDING"

'database query
Expression = "DB(FCRV,SWAP,ZERO,2M,RT_MID)"

'ReDim Values(1 To 200) ..... do i need to do this ?

'I am stuck here ..... how to capture data into the array "Values()" below ... I
mean what should I include here (???) .....

Values(???) = Application.Run("DQ_SERIES", startdate, enddate, frequency,
frequencyconversion, nacode, calendar1, Expression, dateformat, dataorder)

With Range("DataField")
Range(.Offset(0, 0), .Offset(UBound(Values, 2), UBound(Values, 1))) =
Transpose(Values)
End With

End Sub

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on simple question Or get search suggestion and latest updates.




Tagged: