Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
range.offset(0,1) is OK but range.offset(0,2) not clara Excel Programming 1 April 20th 07 07:14 PM
Range Offset jsd219 Excel Programming 4 November 1st 06 02:00 PM
Copy range using offset range value caroline Excel Programming 2 February 16th 06 02:51 PM
Problem with Range.Cells.Offset and Range.Cells( row + offset, column) [email protected] Excel Programming 2 August 22nd 05 05:25 AM
range offset bbxrider[_2_] Excel Programming 7 July 20th 05 10:10 AM


All times are GMT +1. The time now is 03:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"