Don could well have understood your post correct by I read it slightly
differently. That is you want to assign a range to a variable not a range
name. If this is the case you can 'pick the bones' from the code below.
(The trick to assigning an object variable is that it must be 'Set'. (The
mywks variable is not necessary but if you are going to move sheets during
the code it is best to assign that too)
Sub assignVariable()
Dim myWks As Worksheet
Dim ABC As Range
Set myWks = Worksheets("Sheet1")
Set ABC = myWks.Range("A12000")
ABC.Select
End Sub
Hopefully between Don and myself, you have an answer
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
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.