我不断得到应用程序定义或对象定义错误,**中的代码突出显示。我怎样才能解决这个问题?
Private Sub Update_Click()
answer = MsgBox("Are you sure you want to update the Staff Record?",
vbYesNo + vbQuestion, "Update Staff Record")
If answer = vbYes Then
*Cells(Row, 1) = TextBox6.Text*
Cells(Row, 2) = TextBox1.Text
Cells(Row, 3) = TextBox2.Text
Cells(Row, 4) = TextBox3.Text
Cells(Row, 5) = ComboBox1.Text
Cells(Row, 6) = ComboBox2.Text
Cells(Row, 7) = TextBox4.Text
Cells(Row, 8) = ComboBox3.Text
Cells(Row, 9) = TextBox5.Text
End If
End Sub
最近有很多这样的问题被问过,我认为这个问题可能与superuser.com/questions/1127224重复。☺
—
Rajesh S
@RajeshS建议复制目标问题需要至少有一个答案。
—
Twisty Impersonator
Cells
不能单独使用。尝试类似的东西ActiveSheet.Cells(...
。还有什么价值Row
?