CatDaddy
06-03-2011, 10:46 AM
trying to move multiple sheets to same new workbook and i get this error on the undelined line:
Dim WB1 As Workbook
Set WB1 = ActiveWorkbook
WB1.Sheets("PIVOT").Select
Range("BA55").Select
Selection.ShowDetail = True
Sheets("Sheet1").Select
Sheets("Sheet1").Move
ActiveWorkbook.SaveAs _
Filename:="Sample.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled
WB1.Activate
WB1.Sheets("PIVOT_1").Select
Range("AM51").Select
Selection.ShowDetail = True
Sheets("Sheet2").Select
Sheets("Sheet2").Move After:=Workbooks("Sample").Sheets(1)
Dim WB1 As Workbook
Set WB1 = ActiveWorkbook
WB1.Sheets("PIVOT").Select
Range("BA55").Select
Selection.ShowDetail = True
Sheets("Sheet1").Select
Sheets("Sheet1").Move
ActiveWorkbook.SaveAs _
Filename:="Sample.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled
WB1.Activate
WB1.Sheets("PIVOT_1").Select
Range("AM51").Select
Selection.ShowDetail = True
Sheets("Sheet2").Select
Sheets("Sheet2").Move After:=Workbooks("Sample").Sheets(1)