Aug 28 2023 12:54 PM - edited Aug 28 2023 01:18 PM
How do I assign Range.Offset to a variable?
Dim x As Range: x = rng.Offset(0,-1)
x.ClearContents
I'm getting Object required error message
Aug 28 2023 01:10 PM - edited Aug 28 2023 01:11 PM
SolutionYou must use the keyword Set to assign an object:
Set x = rng.Offset(0, -1)
By the way, didn't you want
x.ClearContents