Hello Programmers,
I have this code below, that copies sheet 1 of a workbook. I need to also copy sheets 2 & 3 (or the whole workbook). As you can see, I only copy the format, then the values, to eliminate the formulas and links.
I'm having a problem getting the other two sheets to copy. How can I fix this in this manner?
'subroutine to archive worksheet with current date into a specified location
Sub test()
Columns("A:I").Select
Selection.Copy
Workbooks.Add
Columns("A:I").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("D1").Select
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:= _
"c:\ArchiveTestFolder\" & Format(Date, "mm-dd-yyyy") & " Sunday Worksheet.xls" ' _
FileFormat:=xlNormal, Password:="", WriteResPassword:=""' _
ReadOnlyRecommend:=False, CreateBackup:=False
ActiveWorkbook.Close
returnvalue = MsgBox("Don't Forget To Put All Deposit Slips In The Book", 64, "Secretary's Message")
If returnvalue = 1 Then 'User chose Ok
Thanks,
EMoe
Bookmarks