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. |
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. |
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. |
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. |
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! |
All times are GMT +1. The time now is 02:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com