Hi all
I'm having this problem with the below vba code
I'm getting error "copy method of worksheet class failed"
it might have to do something with my personal.xlsb file I'm not sure
any help is appreciated
thanks
I'm having this problem with the below vba code
VBA Code:
Sub CopySheetFromClosedWorkbook()
Dim sourceBook As Workbook
Application.ScreenUpdating = False
Set sourceBook = Workbooks.Open("C:\Users\jack\Documents\abcd\Sales invoice.xlsx")
With Workbooks(sourceBook.Name)
.Sheets("aaa").Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
sourceBook.Close
Application.ScreenUpdating = True
end with
End Sub
I'm getting error "copy method of worksheet class failed"
it might have to do something with my personal.xlsb file I'm not sure
any help is appreciated
thanks