A massive and OOP-esque way to handle this is to pass the worksheet as a parameter:
Sub Rollup()
Dim wb As Workbook, MyPath, MyTemplate, MyName
Dim ws As Worksheet
MyPath = "I:\Reports\Rollup Reports\"
MyTemplate = "*.xlsx"
MyName = Dir(MyPath & MyTemplate)
Do While MyName <> ""
Set wb = Workbooks.Open(MyPath & MyName)
For Each ws In wb.Worksheets
LocationReport (ws)
Next ws
wb.Close True
MyName = Dir()
Loop
End Sub
Sub LocationReport(ByRef ws As Worksheet)
Application.ScreenUpdating = False
With ws
.Range("N4").FormulaR1C1 = "1"
.Range("N4").Copy
.Range("B2:J7,B10:J20,B23:J28").Select
.Range("B23").Activate
.Selection.PasteSpecial Paste:=xlAll, Operation:=xlMultiply, SkipBlanks:= _
False, Transpose:=False
With .Rows("1:1")
Application.CutCopyMode = False
.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End With
End With
Application.ScreenUpdating = True
End Sub
, , Range.Select, Selection.Method. , , , .
.