Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range References in vba
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range References in vba
Try
With Sheet4 .Range(.Range("tStart"),.Range("tEnd")).Value = "Temp" End With -- HTH Bob "Isis" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range References in vba
Use a comma so seperate the names, not a colon.
Sheet4.Range("tStart","tEnd").Value = "Temp" -- Best Regards, Luke M "Isis" wrote in message ... 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range References in vba
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 "Isis" wrote: 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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Offset vs. Range references | Excel Programming | |||
Relative range references in VBA - how? | Excel Programming | |||
Range references in VB | Excel Programming | |||
How to rename references from range names to cell references | Excel Discussion (Misc queries) | |||
Column and row references of range | Excel Programming |