LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 183
Default Copy range using offset range value

Hello,
THe following code works on Excel 2002 but seems to fail on another computer
with Excel 2003

Dim TargetCell1 As Range
Set TargetCell1 = Range("TargetCell1")
Range(TargetCell1, TargetCell1.Offset(Range("MaxNoTerritory").Value, 0)).Copy
Range("TargetDisplayCell1").PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

The error message is
Run-time error '-2147417848 (80010108)':
Method 'PasteSpecial' of object 'Range' failed

and in the debug the following appears
Range("MaxNoTerritory").Value = Method 'Range' of object'_Global' failed

Can you help?
Thanks in advance
--
caroline
 
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 EXCEL copy cell that meets criteria in a range confused Excel Worksheet Functions 3 March 27th 08 01:41 PM
How to apply OFFSET as the range in a basic 'Copy' process... cdavidson Excel Discussion (Misc queries) 4 November 8th 05 08:43 PM
Create/copy combo boxes in one range if condition is met in a different range LB[_4_] Excel Programming 4 September 30th 05 12:21 AM
Problem with Range.Cells.Offset and Range.Cells( row + offset, column) [email protected] Excel Programming 2 August 22nd 05 05:25 AM
Select and Copy Range using Offset jondorv Excel Programming 1 May 16th 04 05:23 PM


All times are GMT +1. The time now is 05:57 PM.

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

About Us

"It's about Microsoft Excel"