Adding a worksheet from an external workbook using VBA
Question
How do I use the Worksheet.Add
function to add a worksheet from an external workbook?
When I try to add a worksheet from an external workbook I get an error:
Method 'Add' of object 'Sheets' failed on the third line`
Here is my code:
Application.ScreenUpdating = False
Dim ws As Worksheet
Set ws = Worksheets.Add(After:=Sheet1, Count:=2,Type:="\\SharedDrive\Worksheet\Student.xltm")
Application.ScreenUpdating = True
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow