Thread: Offset Prob
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Edgar[_3_] Edgar[_3_] is offline
external usenet poster
 
Posts: 40
Default Offset Prob

Hi

I am trying to name the variable name1 by an offset of
range a1 by a1 rows and 1 column.

But the following codes not working can anyone help me?

TIa

Sub TestName()

drp = Range("A1")
name1 = Worksheets("control").Range(drp).Offset(drp, 1)
MsgBox (name)

End Sub