poptart141
New Member
- Joined
- Apr 1, 2013
- Messages
- 4
I have a workbook that has multiple sheets related to current projects my department is working on. Whenever cell C3 in one of these sheets says "Complete" or "Archived," I need that whole sheet to be moved to another workbook, called "CPTS Complete & Archived." Here's the code I have so far, which isn't doing anything:
Can someone tell me what I can do to make that work?
Code:
Sub MoveSheets()
Dim NewWorkbook As Workbook
Set NewWorkbook = Workbooks("CPTS Complete & Archived.xlsx")
If InStr(1, ActiveSheet.Range("C3").Value, "Complete" Or "Archived") > 0 Then
Application.Workbooks.Open ("C:\Documents and Settings\username\Desktop\CPTS\CPTS Complete & Archived.xlsx")
ActiveSheet.Move After:=NewWorkbook.Sheets(NewWorkbook.Sheets.Count)
Workbooks("CPTS Complete & Archived.xlsx").Save
Workbooks("CPTS Complete & Archived.xlsx").Close
End If
End Sub
Can someone tell me what I can do to make that work?