How do you correct assigna variable to store the reference to the cell ? Last line throws Subscript out of range error
Public Sub CommandButton1_Click() Dim var
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.
ABC
Abc
ABc