Naming in Sheet how using by VBA?

  • Thread starter Cactus [ÏÉÈËÇò]
  • Start date
C

Cactus [ÏÉÈËÇò]

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.
 
D

Don Guillett

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
 
B

Bob Phillips

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
[email protected]
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.
 
Top