Get Range Address from a String

S

Steph

I've loaded a cell address into a string via the following macro:

Sub Test()

Dim Rng As String

Rng = ActiveCell.Address(external:=True)
Debug.Print Rng

End Sub

Is there a way to convert the string back to full cell address (workbook,
worksheet, and cell address) without parsing the string?

Thanks for your help.
 
J

Jacob Skaria

If you mean convert back to a range..then

Dim myRange as Range
Set myRange = Range(Rng)

If this post helps click Yes
 
J

Jacob Skaria

Or do you mean,...

Sub Test()
Dim Rng As String
Rng = ActiveCell.Address(external:=True)
Debug.Print Rng

'convert it back
Dim myRange As Range
Set myRange = Range(Rng)
Debug.Print myRange.Address(external:=True)
End Sub

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top