Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default Named Ranged, help please

Cell E3 is called "Latest"

In this column I offset to paste vlaues in from other sheets intop the
relvant ow (determined by the offset - could you Lookup I guess).
However do I need to Dim the range to ge tthe following to work?

MyWBAccRep.Sheets("Volumes").Range("Latest").Copy
Destination:=Range("Latest").Offset(0, 1)

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Named Ranged, help please

Named ranges are not part of a workbook but part of the application level of
a workbook. Try this

from
MyWBAccRep.Sheets("Volumes").Range("Latest").Copy

to
MyWBAccRep.application.Sheets("Volumes").Range("La test").Copy


"Simon" wrote:

Cell E3 is called "Latest"

In this column I offset to paste vlaues in from other sheets intop the
relvant ow (determined by the offset - could you Lookup I guess).
However do I need to Dim the range to ge tthe following to work?

MyWBAccRep.Sheets("Volumes").Range("Latest").Copy
Destination:=Range("Latest").Offset(0, 1)

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Named Ranged, help please

You need to be explicit with your references. You are good on the copy but
you are not explicit on your destination...

With MyWBAccRep.Sheets("Volumes").Range("Latest")
.Copy Destination:=.Offset(0, 1)
end with

What you have is equavalent to
MyWBAccRep.Sheets("Volumes").Range("Latest").Copy
Destination:=Activesheet.Range("Latest").Offset(0, 1)

so if Latest is not on the active sheet it will bomb...

--
HTH...

Jim Thomlinson


"Simon" wrote:

Cell E3 is called "Latest"

In this column I offset to paste vlaues in from other sheets intop the
relvant ow (determined by the offset - could you Lookup I guess).
However do I need to Dim the range to ge tthe following to work?

MyWBAccRep.Sheets("Volumes").Range("Latest").Copy
Destination:=Range("Latest").Offset(0, 1)

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Named Ranged, help please

I think you are mistaken. Range names are either tied to the Workbook for
global named ranges or to the worksheet for local named ranges. The Object
Model is
Application - Workbooks - Worksheets
The appliation contains 0 or more workbooks. A Workbook contains 1 or more
worksheets. A workbook can not contain an application.

If you check the value of Thisworkbook.Application and ThisWorkbook.Parent
you will see that they are both the same.
--
HTH...

Jim Thomlinson


"Joel" wrote:

Named ranges are not part of a workbook but part of the application level of
a workbook. Try this

from
MyWBAccRep.Sheets("Volumes").Range("Latest").Copy

to
MyWBAccRep.application.Sheets("Volumes").Range("La test").Copy


"Simon" wrote:

Cell E3 is called "Latest"

In this column I offset to paste vlaues in from other sheets intop the
relvant ow (determined by the offset - could you Lookup I guess).
However do I need to Dim the range to ge tthe following to work?

MyWBAccRep.Sheets("Volumes").Range("Latest").Copy
Destination:=Range("Latest").Offset(0, 1)

Thanks

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
Named ranged selection problem Martin B Excel Worksheet Functions 3 January 4th 08 09:32 PM
Adding Named ranged for each column... [email protected] Excel Programming 2 December 1st 06 03:30 AM
Changing a named ranged based on array size on a form Wanderer[_2_] Excel Programming 2 June 27th 06 01:10 PM
Vlookup - Using a named ranged for col_index_num [email protected] Excel Discussion (Misc queries) 2 June 1st 05 05:38 PM
Counting in ranged intervals No Name Excel Programming 2 April 12th 04 07:39 PM


All times are GMT +1. The time now is 02:36 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"