suprsnipes
Active Member
- Joined
- Apr 26, 2009
- Messages
- 434
Hi,
I am using a macro to create a formula that is placed in a couple of columns. I'm progressing ok but I need some help. What I want to know is I'm creating a request that is returning data which I want to use to perform the second part of my macro.
Is it possible after creating the request to somehow save the data that is returned for use during the second part of the macro? This is my code so far.
Any ideas or suggestions would be much appreciated.
suprsnipes
I am using a macro to create a formula that is placed in a couple of columns. I'm progressing ok but I need some help. What I want to know is I'm creating a request that is returning data which I want to use to perform the second part of my macro.
Is it possible after creating the request to somehow save the data that is returned for use during the second part of the macro? This is my code so far.
Code:
Sub YHOO_Buy()
Dim Id1 As Long
Dim Id2 As Long
req1 = "BUY_111_YHOO_STK_SMART_USD_MKT_{}_DAY_{}_{}_O_0_{}_1_{}_0_0_0_0_{}_0_0_{}_{}_{}_{}_{}_{}_{}_ISLAND'"
Id1 = Round((Date - 39000 + Time) * 1000000, 0)
ThisWorkbook.Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Offset(1).Value = "=edemo|ord!'id" & Id1 & "?place?" & req1
ThisWorkbook.Sheets("Sheet1").Range("D" & Rows.Count).End(xlUp).Offset(1).Value = "=edemo|ord!id" & Id1 & "?price"
[COLOR=Red]'NOTE: The above line "edemo|ord!id" & Id1 & "?price" is the code for the request that returns a price which I want to use in the req2 code below (at this point it's marked "Price")[/COLOR]
req2 = "SELL_111_YHOO_STK_SMART_USD_LMT_" & "Price" & "_{}_DAY_{}_{}_O_0_{}_1_{}_0_0_0_0_{}_0_0_{}_{}_{}_{}_{}_{}_{}_ISLAND'"
Id2 = Round((Date - 39000 + Time) * 1000000, 0)
ThisWorkbook.Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Offset(1).Value = "=edemo|ord!'id" & Id2 & "?place?" & req2
ThisWorkbook.Sheets("Sheet1").Range("D" & Rows.Count).End(xlUp).Offset(1).Value = "=edemo|ord!id" & Id2 & "?price"
suprsnipes