Naming in Sheet how using by VBA?

  • Thread starter Thread starter =?gb2312?B?Q2FjdHVzIFvPycjLx/Jd?=
  • Start date Start date
?

=?gb2312?B?Q2FjdHVzIFvPycjLx/Jd?=

A sheets cell have a named.
Exaplme: Sheet1!Records=[Sheet1!B1]

I don't want use Sheet1.Range("B1") in VBA,
because the cell can moving sometime.
so I set the cell a name.

but I don't know how use the name of sheets in VBA.


Thank.
 
try this in any worksheet in the workbook to put the value of myrange in
cell c6
Sub namedrng()
Range("c6") = Range("myrange")
End Sub
 
Maybe

Worksheets("Sheet1").Range("myRange").Value

--

HTH

RP
(remove nothere from the email address if mailing direct)


Don Guillett said:
try this in any worksheet in the workbook to put the value of myrange in
cell c6
Sub namedrng()
Range("c6") = Range("myrange")
End Sub

--
Don Guillett
SalesAid Software
(e-mail address removed)
Cactus said:
A sheets cell have a named.
Exaplme: Sheet1!Records=[Sheet1!B1]

I don't want use Sheet1.Range("B1") in VBA,
because the cell can moving sometime.
so I set the cell a name.

but I don't know how use the name of sheets in VBA.


Thank.
 
Back
Top