B
bob
the following code will copy the source to data sheet if it is the first
postition on destination but i get an error if i hide the temporary data
sheet
how do i copy to a hidden sheet
ActiveWorkbook.Windows(1).Caption = "Book1"
'delete data sheet each time before copy
Application.DisplayAlerts = False 'trun off del warning
Windows("test1.xls").Activate
Application.DisplayAlerts = True 'trun warning back on
Windows("Book1").Activate
' COPY to test1 workbook & Data sheet, place at beginning
ActiveWorkbook.ActiveSheet.Copy Before:=Workbooks("test1.xls").Sheets(1)
' Rename first sheet
Workbooks("test1.xls").Sheets(1).Name = "Data"
postition on destination but i get an error if i hide the temporary data
sheet
how do i copy to a hidden sheet
ActiveWorkbook.Windows(1).Caption = "Book1"
'delete data sheet each time before copy
Application.DisplayAlerts = False 'trun off del warning
Windows("test1.xls").Activate
ActiveWindow.SelectedSheets.DeleteSheets("Data").Select
Application.DisplayAlerts = True 'trun warning back on
Windows("Book1").Activate
' COPY to test1 workbook & Data sheet, place at beginning
ActiveWorkbook.ActiveSheet.Copy Before:=Workbooks("test1.xls").Sheets(1)
' Rename first sheet
Workbooks("test1.xls").Sheets(1).Name = "Data"