ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Strange thing when copying a range !! (https://www.excelbanter.com/excel-programming/437405-re-strange-thing-when-copying-range.html)

JLGWhiz[_2_]

Strange thing when copying a range !!
 
Show us where you assign the value to "Fall_from_height" either as a named
range or as a variable



"Luc" wrote in message
...
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



Luc[_7_]

Strange thing when copying a range !!
 
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)


"JLGWhiz" schreef in bericht
...
Show us where you assign the value to "Fall_from_height" either as a
named range or as a variable



"Luc" wrote in message
...
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



TimK

Strange thing when copying a range !!
 
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).


--
TimK


"Luc" wrote:

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)


"JLGWhiz" schreef in bericht
...
Show us where you assign the value to "Fall_from_height" either as a
named range or as a variable



"Luc" wrote in message
...
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


.



All times are GMT +1. The time now is 01:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com