第1页是我放置日期、时间、门票、分数和是/否/NA答案的地方。
我有一个Submit按钮,它调用一个模块来保存从第1页到第2页的内容,但只保存Date to Score。我对是/否/NA的回答有问题。我想从第1页到第2页保存这些值1次,但我得到了
应用程序定义错误
。请参见下文。
第1页
第2页
单元
Option Explicit
Function saveTo()
Dim sh, sh2 As Worksheet
Set sh = ThisWorkbook.Sheets("Page2")
Set sh2 = ThisWorkbook.Sheets("Page1")
Dim n As Long
n = sh.Range("A" & Application.Rows.Count).End(xlUp).Row
sh.Range("A" & n + 1).Value = sh2.Range("E3")
sh.Range("B" & n + 1).Value = sh2.Range("E4")
sh.Range("C" & n + 1).Value = sh2.Range("E5")
sh.Range("D" & n + 1).Value = sh2.Range("J3")
sh.Range("$E:$BC" & n + 1).Value = sh2.Range("$E$7:$E$57")
End Function