Why doesn't this work? I've got a string variable populated with "$A$1", and need to convert that to a range object:
If I debug.print RngString and Rng, I get "$A$1" and " ", respectively.
EDIT: This is in a UDF, if that affects your response at all.
VBA Code:
Dim Rng As Range
Dim RngString As String
RngString = "$A$1"
Set Rng = Range(RngString)
Rng.AddComment("Hello World")
If I debug.print RngString and Rng, I get "$A$1" and " ", respectively.
EDIT: This is in a UDF, if that affects your response at all.