求问VBA编程中出现错误:缺少子程序、函数或属性
这是我的程序:PublicSub自动记录调查数据()DimtempAsIntegerDimcountAsIntegertempSheets("数据表").[A1].Cur...
这是我的程序:
Public Sub 自动记录调查数据()
Dim temp As Integer
Dim count As Integer
temp Sheets("数据表").[A1].CurrentRegion.roes.count
count = temp - 3 '
Sheets("问卷").Select
Range("A50:H50").Select
Selection.Copy '
Sheets ("数据表"), Activate
Rows(temp + 1).Select
ActiveSheet.Paste
Cells(temp + 1, 13).Value = count + 1
Sheets("问卷").Select
Application.CutCopyMode = False
MsgBox "记录已成功保存,谢谢!", vbOKOnly, "确定"
End Sub
这程序是用来自动记录问卷的调查结果的 展开
Public Sub 自动记录调查数据()
Dim temp As Integer
Dim count As Integer
temp Sheets("数据表").[A1].CurrentRegion.roes.count
count = temp - 3 '
Sheets("问卷").Select
Range("A50:H50").Select
Selection.Copy '
Sheets ("数据表"), Activate
Rows(temp + 1).Select
ActiveSheet.Paste
Cells(temp + 1, 13).Value = count + 1
Sheets("问卷").Select
Application.CutCopyMode = False
MsgBox "记录已成功保存,谢谢!", vbOKOnly, "确定"
End Sub
这程序是用来自动记录问卷的调查结果的 展开
1个回答
展开全部
部分代码有误,修正参考如下:
Public Sub 自动记录调查数据()
Dim temp As Integer
Dim count As Integer
temp=Sheets("数据表").[A1].CurrentRegion.Rows.count
count = temp - 3 '
Sheets("问卷").Select
Range("A50:H50").Select
Selection.Copy '
Sheets("数据表").Activate
Rows(temp + 1).Select
ActiveSheet.Paste
Cells(temp + 1, 13).Value = count + 1
Sheets("问卷").Select
Application.CutCopyMode = False
MsgBox "记录已成功保存,谢谢!", vbOKOnly, "确定"
End Sub
希望能帮上忙!
Public Sub 自动记录调查数据()
Dim temp As Integer
Dim count As Integer
temp=Sheets("数据表").[A1].CurrentRegion.Rows.count
count = temp - 3 '
Sheets("问卷").Select
Range("A50:H50").Select
Selection.Copy '
Sheets("数据表").Activate
Rows(temp + 1).Select
ActiveSheet.Paste
Cells(temp + 1, 13).Value = count + 1
Sheets("问卷").Select
Application.CutCopyMode = False
MsgBox "记录已成功保存,谢谢!", vbOKOnly, "确定"
End Sub
希望能帮上忙!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询