我试图在我的建议变量中引用项目,但是由于某种原因,无论何时我尝试引用它,我都会遇到错误。我不能在变量中引用状态吗?我该如何解决此错误?
Option Explicit
Public Sub CountDownTimer()
With ThisWorkbook.Worksheets("Countdown")
Dim Duration As Long
Duration = 10 ' needs to be in seconds!
'if your cell has a real datetime then use
Duration = .Range("A13").Value * 24 * 60 * 60
Dim TimerStart As Double
TimerStart = Timer()
Do While Timer <= TimerStart + Duration
.Range("A13").Value = TimeSerial(0, 0, TimerStart + Duration - Timer)
DoEvents
Loop
ThisWorkbook.Worksheets("Countdown").Range("A13:H17").ClearContents
End With
End Sub
答案 0 :(得分:2)
data
在这里,您将项目设置为字符串。它不再是数组。
更改为
this.setState({items: "n;ajsdfasd"});