View Single Post
 
Old 05-06-2018, 08:37 AM
p45cal's Avatar
p45cal p45cal is online now Windows 10 Office 2010 32bit
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Without having tested, change the these lines:
Code:
Sub testing()
Dim ws As Worksheet, fndRng As Range
For Each ws In ThisWorkbook.Sheets
to:
Code:
Sub testing(wkbook)
Dim ws As Worksheet, fndRng As Range 
For Each ws In wkbook.Sheets
then you can call your testing procedure in several ways, eg.:
Code:
testing Workbooks("PPE102815.xlsm")
or:
Code:
Set wkb = Workbooks.Open("G:\1. Payroll Files\2016\PPE102815.xls")
testing wkb
Reply With Quote