Reputation: 13
Dim wsCopy As Worksheet
Dim wsDest As Worksheet
Set wsCopy = Workbooks(ThisWorkbook.Path).ActiveSheet <- error
Set wsDest = Workbooks("aa.xlsx").Worksheets("bb")
it doesn't work...
Upvotes: 1
Views: 103
Reputation: 166885
Set wsCopy = ThisWorkbook.ActiveSheet
FYI ThisWorkbook.Path
is the folder location for the workbook - you'd need Workbooks(ThisWorkbook.Name)
if you wanted to go that route (but you don't need to...)
Upvotes: 3