所以我正在编写一个引用bloomberg单元格公式的代码......因此循环通常比数据加载速度更快。我认为如果我能以某种方式延迟循环的迭代,这可以相对容易地解决......这会给细胞时间来填充。这是我到目前为止所写的,我不确定如何写最后一行。
x = 1
If x < TixCollection.count Then
' runs report if ADR Close is active
If Sheets("Input").Range("L2").value = "x" Then
Call build_singleEquity(x)
'Set pat = New pattern
Application.OnTime Now + TimeValue("00:00:10"), "pattern_recogADR"
If Sheets("Input").Range("L5").value = "x" Then
Dim sht_name As String
sht_name = TixCollection(x).ADR & "_ADRclose"
Call Sheet_SaveAs(path_ADRclose, sht_name, "SingleEquityHistoryHedge")
End If
End If
'runs report if ORD Close is active
If Sheets("Input").Range("L9").value = "x" Then
Call build_ordCloseTrade(x)
If Sheets("Input").Range("L13").value = "x" Then
Dim sht_name1 As String
sht_name1 = TixCollection(x).ADR & "_ORDclose"
Call Sheet_SaveAs(path_ORDclose, sht_name1, "OrdCloseTrade")
End If
End If
Application.OnTime Now + TimeValue("00:00:15"), x = x + 1 'want to write something like this but syntax is wrong