Strange thing when copying a range !!

  • Thread starter Thread starter Luc
  • Start date Start date
L

Luc

The following code gives me the error " 1004 ..." in the second line

Sheets ("MASTER").Select
Range("Fall_from_height").Select 'PS : the range exists !!
Copy



The following code works, but after the Copy instruction it creates an new workbook !!!!! (i do not want that it creates a new workbook).

Sheets ("MASTER").Select
Application.Goto Reference:="Fall_from_height"
Copy







HEEEEEEELP

Luc
 
Hi Luc

Sheets ("MASTER").Range("Fall_from_height").copy

If you want to paste it say in A1 then


Sheets ("MASTER").Range("Fall_from_height").copy Range("A1")


Take care

Marcus
 
Show us where you assign the value to "Fall_from_height" either as a named
range or as a variable



The following code gives me the error " 1004 ..." in the second line

Sheets ("MASTER").Select
Range("Fall_from_height").Select 'PS : the range exists !!
Copy



The following code works, but after the Copy instruction it creates an new
workbook !!!!! (i do not want that it creates a new workbook).

Sheets ("MASTER").Select
Application.Goto Reference:="Fall_from_height"
Copy







HEEEEEEELP

Luc
 
I applied the name by using the menu .... insert , name, define...(Excel
2003) (i guess those are the english names, because i use the Dtch Excel
version)
 
Luc,

I'm pretty new to VBA, but I don't belive that a range is created when you
assign a name using the 'name/insert/define method'.

I know that that it sures to seems to me that you would be, but the vba
editor will not show properties or methods when you edit references to those
names.

Hope this helps (and is correct).
 
Back
Top