Hopefully an easy question, but I'd quite like a technical answer to this!
What's the difference between:
i = 4
and
Set i = 4
in VBA? I know that the latter will throw an error, but I don't fully understand why.
set
is used to assign a reference to an object. The C equivalent would be
int i;
int* ref_i;
i = 4; // Assigning a value (in VBA: i = 4)
ref_i = &i; //assigning a reference (in VBA: set ref_i = i)