hi there,
I tried copying(create a copy) a bunch of worksheets from one workbook to another. I was prompt
'A formula or sheet you want to move or copy contains the name 'body', which already exists on the destination worksheet. Do you want to use this version of the name?
below is my code
Regards
Edmund
I tried copying(create a copy) a bunch of worksheets from one workbook to another. I was prompt
'A formula or sheet you want to move or copy contains the name 'body', which already exists on the destination worksheet. Do you want to use this version of the name?
- to use the name as defined in the destination sheet, click yes
- to rename the range referred to in the formula or worksheet, click no
below is my code
Pls adviseSub PushTable()
Dim wOB As Workbook, wMB As Workbook
Application.ScreenUpdating = False
Workbooks.Open Filename:="c:\A.xlsx"
Set wOB = Workbooks("A.xlsx")
Set wMB = Workbooks("Final.xlsm")
wOB.Activate
wOB.Worksheets(Array("sheet5", "sheet1", "sheet2", "sheet3", "sheet4")).Copy Before:=wMB.Worksheets(1)
wOB.Close SaveChanges:=False
Application.ScreenUpdating = True
End Sub
Regards
Edmund