This should not be a Function but a Sub.
The code should sit in a standard code-module, not a Worksheet's code module, nor the ThisWorkbook's code-module.
I used air-code because you gave us little information to go on.
NewSheet is an object variable you should earlier have assigned your destination worksheet, it might have been
Set NewSheet=Sheets.add(after:=Sheets(Sheets.count)) ' a brand new added sheet
or Set NewSheet=Sheets("TheNameOfYourDestinationSheetHereNotThisGarbage")
or you don't have to use NewSheet at all:
Set Destn = Sheets("TheNameOfYourDestinationSheetHereNotThisGarbage").Range("A1")
The names in the likes of:
Array("Name1", "Name2", "Name3", "Name4", "Name5")
need to be names of ranges that exist in your workbook. I feel it's unlikely you have named ranges called "Name1", "Name2", "Name3" etc.
So again, air code:
Sub blah()
Dim myNames, Destn As Range, nme, NewSheet As Worksheet
myNames = Array("Name1", "Name2", "Name3", "Name4", "Name5")
Set NewSheet = Sheets("TheNameOfYourDestinationSheetHereNotThisGarbage") 'just one example of many possibilities.
Set Destn = NewSheet.Range("A1") 'destination of first named range copy
For Each nme In myNames
With Range(nme)
.Copy Destn
Set Destn = Destn.Offset(.Rows.Count)
End With
Next nme
End Sub
If you want a definitive answer, supply a workbook with the necessary named ranges and destination worksheet.