Hi all
I'm wondering if anybody can simply translate a line of VBA code for me. It was written by somebody else, and i'm struggling to make sense of it. I'd attach the whole file but privacy laws forbid it i'm afraid. The line is:
On debugging this code I find that "Answer = Nothing", when it should be pointing to a specific column value.
To give further information, this line of code is taken from a macro that copies a value from Sheet2 into Sheet1, but uses several variables to work out where in Sheet2 the value is copied.
I understand its an obscure request, but I'd appreciate any pointers all the same.
Thanks in advance!
I'm wondering if anybody can simply translate a line of VBA code for me. It was written by somebody else, and i'm struggling to make sense of it. I'd attach the whole file but privacy laws forbid it i'm afraid. The line is:
Code:
Set Answer = Sheets("Sheet1").Range(Replace(Cells(2, Question.Column).Address(False, False), "1", "") & ":" & Replace(Cells(2, Question.Column + 5).Address(False, False), "1", "")).Find(Target.Offset(0, -4).Value)
On debugging this code I find that "Answer = Nothing", when it should be pointing to a specific column value.
To give further information, this line of code is taken from a macro that copies a value from Sheet2 into Sheet1, but uses several variables to work out where in Sheet2 the value is copied.
I understand its an obscure request, but I'd appreciate any pointers all the same.
Thanks in advance!