Offset & Range

  • Thread starter Thread starter Karen53
  • Start date Start date
K

Karen53

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?
 
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...
 
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
 
Did you try:

LineItemspg.Range(ItemRange).Offset(0, 4).HorizontalAlignment = xlHAlignCenter
 

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

Back
Top