用于更新另一个工作表上的单元格的 Excel 微调按钮

问题描述

我希望在我的第一个工作表上使用 Excel 微调按钮来更新第二个工作表上单元格的值。要更新的单元格的地址是一个基于在第一个工作表的下拉菜单中选择的值的变量。我不断收到错误 - 可以这样做吗? Link to Excel file in question

Private Sub SpinButton1_Change()

cell = Range("G2").Value
cellText = "Reference!" & cell   'Here I am trying to concatenate another worksheet named "Reference" and the cell range to be updated on that worksheet


Range(cellText).Value = SpinButton1.Value  'Here I am trying to use that concatenation to update the value of the cell on the second worksheet.


End Sub

我收到的错误是:

'Runtime error 1004':
Method 'Range' of object' '_Worksheet' Failed

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)