Strange thing when copying a range !!

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
 
M

marcus

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
 
J

JLGWhiz

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
 
L

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)
 
T

TimK

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).
 

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

Top