excel - 尽管通过 VBA 打开代码,但仍然遇到“编译错误:找不到方法或数据成员”
问题描述
当我尝试运行我的代码时,我一直遇到编译错误。即使我通过双击按钮拉出代码并自动填充它,它仍然突出显示第一行。如果有什么我完全想念的,请告诉我。
Private Sub SubmitButton1_Click() **this is the line it is highlighting and showing an error for**
Dim emptyRow As Long
'Make Fridge Inventory sheet active
FridgeInventory.Activate
'Determine emptyRow
emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1
'Transfer information
Cells(emptyRow, 1).Value = Item.Value
Cells(emptyRow, 2).Value = Amount.Value
Cells(emptyRow, 3).Value = unit.Value
Cells(emptyRow, 4).Value = Quantity.Value
End Sub
解决方案
推荐阅读
- python - 使用 MatPlotLib 和 Seaborn 的 Jupyter Notebook 中的 x 轴问题
- python - kivy python 语言是否可以更改微调器菜单中的背景颜色?
- javascript - 使用字符串作为声明反应组件的 JS 文件
- reactjs - 当它到达数组末尾时,如何将 react-lazyload 占位符属性设置为无?
- r - 使用国家名称的空间可视化 - R
- php - laravel 7 眼睛隐藏
- fish - 如何阻止 Fish shell 存储关键信息
- javascript - 如何根据选择框显示不同的 HTML 表单?
- bash - 从私有存储库中提取 Kubernetes 上的图像问题
- amazon-web-services - 如何加密数据源和 kinesis firehose 之间的传输中数据移动?