excel - 无法获取列表属性。无效参数运行时错误 (-2147024809 (80070057)
问题描述
请跟我裸露,因为我是新手
下面是我的错误代码错误的截图
我想做的是创建一个具有编辑按钮的 Excel 表单,用于编辑数据表中的数据。
您正在查看的是编辑按钮代码。
“粘合剂细节”下面的重复数据块基本上是要编辑的数据集以及它们可能在 Excel 表上的位置。
我似乎无法弄清楚错误是什么。我的错误在第 9 个数据集 cmbwidth1 之后开始,这没有意义,因为之前的一切都可以。
请建议并以我有限的知识做裸露。我会尽力解释情况并分享您需要帮助我解决这个问题的部分代码
部分代码如下
Private Sub cmdedit_Click()
If Selected_List = 0 Then
MsgBox "No row was selected please try again", vbOKOnly + vbInformation, "Edit"
Exit Sub
End If
'code to update the value to respective controls
Me.txtrownumber.Value = Selected_List + 1 'Me referes to the perticular class
'---------------------------------------- home -------------------------------------------------------------
Me.txtname.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 3)
Me.txtstyle.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 4)
Me.txtcustomer.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 5)
'---------------------------------adhessive details-----------------------------------------------------------------
Me.cmbsupplier1.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 6)
Me.cmbadhessive1.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 7)
Me.cmbthickness1.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 8)
Me.cmbwidth1.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 9)
Me.cmbsupplier2.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 10)
Me.cmbadhessive2.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 11)
Me.cmbthickness2.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 12)
Me.cmbwidth2.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 13)
Me.cmbsupplier3.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 14)
Me.cmbadhessive3.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 15)
Me.cmbthickness3.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 16)
Me.cmbwidth3.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 17)
Me.cmbsupplier4.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 18)
Me.cmbadhessive4.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 19)
Me.cmbthickness4.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 20)
Me.cmbwidth4.Value = Me.lstdatabase.List(Me.lstdatabase.ListIndex, 21)
'--------------------------------------------------------------------------------------------------