I'm looking for a bit of code to switch between two open workbooks. One workbook is named Date and the other name can vary by month.
Say I start my script in "Jan" or "Feb" or "March" workbook how can I copy the first sheet from the date workbook back to the workbook I started the script from
Also I'm trying to move the date sheet to the last tab Position I thought to use the .sheets(count) but anyway I try it it wont work correctly I'm getting a "Copy method of worksheet class failed"
Sub
ChDir "G:\Production 2007\Old Production"
workbooks.Open Filename:="G:\Production 2007\Old Production\Date.xls"
'Sheets("Date").Move After:=workbooks("Jan 2008.xls").Sheets(5)
'Sheets("Date").Copy After:=workbooks("Jan 2008.xls").Sheets.Count
Sheets("Date").Copy After:=workbooks("Jan 2008.xls").Sheets(Count)
End Sub
Bookmarks