问题描述
将 Workbook_1 中的值链接到 Workbook_2 上时出现问题。我没有看到语法错误。设置捕获行被标记。非常感谢任何帮助。
Sub RecordData()
Dim NextTime As Date
Dim Interval As Double
Dim cel As Range
Dim Capture As Range
Application.StatusBar = "Recording Started"
Set Capture = Workbooks("Workbook_1.xlsm").Worksheets(“Dashboard”).Range("A22:B22") 'Capture this row of data from Workbook_1
With Worksheets("Log") 'Record the data from Workbook_1 on this sheet on Workbook_2
Set cel = .Range("A2") 'First timestamp goes here
Set cel = .Cells(.Rows.Count,cel.Column).End(xlUp).Offset(1,0)
cel.Value = Now
cel.Offset(0,1).Resize(Capture.Rows.Count,Capture.Columns.Count).Value = Capture.Value
End With
NextTime = Now + TimeValue("00:01:00")
Application.OnTime NextTime,"RecordData"
End Sub
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)