Originally Posted by
LeoTaxi
i think something wrong with the sheet name you create with variables
what is the sheet name in workbook you open ?
I did a debug.print mypath to see if it was doing the right thing, which it is (in the sense that it's pulling up the correct item, not that it's not flawed in some way).
The path to the workbook is S:\2016\10_October_2016\Productivity 10.10.16.xlsx
The reason I set these as variables instead of a static line is because this entire process is to accommodate a weekly transfer I need to do. So rather than typing in the year, then the format of date/month/year, etc all the time, I have it referencing B1 of workbook 1 using
and then pulling the year/month/date from that value.
I'm not sure why it successfully names and opens the correct workbook then errors out though? Do I need to set the wb2 variable later or something?
If I can get this last part to stop breaking, I think the code you put together will execute everything else flawlessly (I tested it having it transfer from Sheet1 to Sheet2 in a single workbook and it worked great, but now that I'm specifying an outside workbook it's going sideways).
I appreciate your help with this.
Bookmarks