Do you Open these 'applications' (Excel Workbooks?) in your code? If so, that makes it easier ... but in any case, it is not particularly difficult.Good Luck and Good Learning! I'll keep an eye on this thread.Code:Option Explicit Sub Macro1() Dim aBook As Workbook 'Loop Index Dim SrcBook As Workbook 'Source Workbook Handle Dim DstBook As Workbook 'Destination Workbook Handle Dim i As Integer 'Book Counter = 2 if 1 source book and 1 destination book i = 0 For Each aBook In Application.Workbooks MsgBox aBook.Name '<< TEST If InStr(1, aBook.Name, "CER") Then SrcBook = aBook: i = i + 1 If InStr(1, aBook.Name, "MAC") Then DstBook = aBook: i = i + 1 Next If i <> 2 Then MsgBox "We do NOT have proper Source and Destination Workbooks!": Exit Sub 'Do your sheet move here ... you can get this from recording a Macro 'SrcBook.Sheets(sheetname_stringvar) is how you reference the source sheet to be moved ' or SrcBook.Sheets("MC") ... End Sub




Reply With Quote