Range References in vba

I

Isis

I have 2 named cells say, tStart and tEnd - If I wanted to set the
contents of all cells within the Range("tStart:tEnd") I thought I could
do something like the following;

Sheet4.Range("tStart:tEnd").Value = "Temp"

but that givs me a '400' type error - what would the way be to reference
these cells.

On a side issue, is it possible to get cell references from a named
cell/Range in some way ?

Thanks for any illumination


Regards
 
B

Bob Phillips

Try

With Sheet4

.Range(.Range("tStart"),.Range("tEnd")).Value = "Temp"
End With
 
L

Luke M

Use a comma so seperate the names, not a colon.

Sheet4.Range("tStart","tEnd").Value = "Temp"
 
F

FSt1

hi
on the side issue, something like this might work
MsgBox Range("tStart:tEnd").Address
or for a range
MsgBox Range("myRange").Address

regards
FSt1
 

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