Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Offset & Range
Hi,
I am not sure I can do this. I have tried a few variations and get error messages. I am trying to format the 4th column of a range, something like this.. LineItemspg.Range(ItemRange).Offset(0, 4).HorizontalAlignment = xlCenter Can I do it like this? -- Thanks for your help. Karen53 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Offset & Range
What are LineItemspg and ItemRange. I assume they are variables or objects of
some sort but if you could post the rest of the code that woud be great... -- HTH... Jim Thomlinson "Karen53" wrote: Hi, I am not sure I can do this. I have tried a few variations and get error messages. I am trying to format the 4th column of a range, something like this.. LineItemspg.Range(ItemRange).Offset(0, 4).HorizontalAlignment = xlCenter Can I do it like this? -- Thanks for your help. Karen53 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Offset & Range
Hi Jim,
Here is the routine. Thanks. Sub CopyPasteItems(ItemRange, ItemFCell) Debug.Print "Starting CopyPasteItems" Call AddSheets.UnProtectSht(Replace(LineItemspg.Name, "'", "''")) Range(ItemRange).Copy Destination:=LineItemspg.Range(ItemFCell) LineItemspg.Range(ItemRange).Offset(0, 4).HorizontalAlignment = xlCenter Call AddSheets.ProtectSht(Replace(LineItemspg.Name, "'", "''")) End Sub -- Thanks for your help. Karen53 "Jim Thomlinson" wrote: What are LineItemspg and ItemRange. I assume they are variables or objects of some sort but if you could post the rest of the code that woud be great... -- HTH... Jim Thomlinson "Karen53" wrote: Hi, I am not sure I can do this. I have tried a few variations and get error messages. I am trying to format the 4th column of a range, something like this.. LineItemspg.Range(ItemRange).Offset(0, 4).HorizontalAlignment = xlCenter Can I do it like this? -- Thanks for your help. Karen53 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Offset & Range
Did you try:
LineItemspg.Range(ItemRange).Offset(0, 4).HorizontalAlignment = xlHAlignCenter "Karen53" wrote: Hi, I am not sure I can do this. I have tried a few variations and get error messages. I am trying to format the 4th column of a range, something like this.. LineItemspg.Range(ItemRange).Offset(0, 4).HorizontalAlignment = xlCenter Can I do it like this? -- Thanks for your help. Karen53 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
range.offset(0,1) is OK but range.offset(0,2) not | Excel Programming | |||
Range Offset | Excel Programming | |||
Copy range using offset range value | Excel Programming | |||
Problem with Range.Cells.Offset and Range.Cells( row + offset, column) | Excel Programming | |||
range offset | Excel Programming |