OK, this is probably a simple problem, but I can't figure it out. I set a range variable (WeeklyDates) to a single row of "week ending" dates at the top of a table (cells D1:BU1). I want to copy a 6-month block of "week ending" dates, ending with a user-specified date (Input_EndDate, which is a named range in ThisWorkbook). All the dates are Friday dates. Macro is running in ThisWorkbook (which is the active workbook); the WeeklyDates range is in another (open) file. Here is some of my code:
WeeklyDates gets correctly set as D1:BU1 on the sheet containing the data. EndCol is correctly assigned as 69 (Input_EndDate matches the value in BT1 of the data sheet). StartCol is correctly set to 44. But I get an Error 1004 when I try to execute the Range.Copy command. What gives? WeeklyDates is a valid range object (one row by 70 columns). Cells(1,44) and (1,69) are within that range. So why is it bombing out? What am I missing here?![]()
Please Login or Register to view this content.
Bookmarks