您如何更正分配变量以存储对单元格的引用?最后一行抛出下标超出范围错误
Public Sub CommandButton1_Click()
Dim variance As Range
Dim risk As Range
Dim time As Range
Dim output As Range
variance = Sheets("ABC").Range("C6")
Set variance = Sheets("ABC").Range("C6")
+
What is the difference between dim and set in vba
+
Subscript out of range means you do not have a sheet named ABC
or the spelling/casing is different. Make sure it's not an Abc
or ABc
etc.