![]() |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 08:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com