Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can't copy named range
Why will this work.....
Sheets("Configuration").Range("J35:Q35").Copy Workbooks(HomeBook).Sheets("Report").Range("B" & LastRow) but not this..... Sheets("Configuration").Range(MyNamed Range).Copy Workbooks(HomeBook).Sheets("Report").Range("B" & LastRow) can't seem to reference a named range in the copy line? Any help appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can't copy named range
" wrote: Why will this work..... Sheets("Configuration").Range("J35:Q35").Copy Workbooks(HomeBook).Sheets("Report").Range("B" & LastRow) but not this..... Sheets("Configuration").Range(MyNamed Range).Copy Workbooks(HomeBook).Sheets("Report").Range("B" & LastRow) can't seem to reference a named range in the copy line? Any help appreciated. Is mynamedrange a variable within the macro or the string name of the range in the spreadsheet. If it is latter try to type range("mynameddrange") if you use this a varaibe use like this dim mynamedrange as string set mynamedrange=range("J35:Q35") then mynamedrange.copy .............. try soemthing on thee lines. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can't copy named range
change name and use
Range("MyNamed_Range").Copy -- Don Guillett SalesAid Software wrote in message oups.com... Why will this work..... Sheets("Configuration").Range("J35:Q35").Copy Workbooks(HomeBook).Sheets("Report").Range("B" & LastRow) but not this..... Sheets("Configuration").Range(MyNamed Range).Copy Workbooks(HomeBook).Sheets("Report").Range("B" & LastRow) can't seem to reference a named range in the copy line? Any help appreciated. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can't copy named range
I think Range("MyNamed Range"), not Range(MyNamed Range), so in my thought
Range("MyNamed Range").Copy Workbooks(HomeBook).Sheets("Report").Range("B" & LastRow) or ActiveWorkbook.Range("MyNamed Range").Copy Workbooks(HomeBook).Sheets("Report").Range("B" & LastRow) would work. keizi wrote in message oups.com... Why will this work..... Sheets("Configuration").Range("J35:Q35").Copy Workbooks(HomeBook).Sheets("Report").Range("B" & LastRow) but not this..... Sheets("Configuration").Range(MyNamed Range).Copy Workbooks(HomeBook).Sheets("Report").Range("B" & LastRow) can't seem to reference a named range in the copy line? Any help appreciated. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can't copy named range
wrote in message oups.com... Why will this work..... Sheets("Configuration").Range("J35:Q35").Copy Workbooks(HomeBook).Sheets("Report").Range("B" & LastRow) but not this..... Sheets("Configuration").Range(MyNamed Range).Copy Workbooks(HomeBook).Sheets("Report").Range("B" & LastRow) can't seem to reference a named range in the copy line? Any help appreciated. Thanks Venkat,Don & Kounoike you were all right I needed to encase the named range in speech marks......I was having a bad macro day must stop eating those fish! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy cells from named range | Excel Discussion (Misc queries) | |||
Copy cells from named range | Excel Discussion (Misc queries) | |||
Sheets named from range, and copy data? | Excel Discussion (Misc queries) | |||
copy named range to powerpoint | Excel Worksheet Functions | |||
copy named range | Excel Programming |