I am quite new to VBA,
Today developing a macro I noticed something funny.
Using Range
like this is working :
Dim rg As Range
Set rg = ActiveSheet.Range("A1:B2")
Using Range
like this does not work and result in error "Object variable not set" :
Dim rg As Range
rg = ActiveSheet.Range("A1:B2")
but using Range
like this is working :
Dim rg,rg2 As Range
rg = ActiveSheet.Range("A1:B2")
How is it possible?