Managed to work this out myself, wasn't far off with my initial thoughts. For anyone who encounters something similar, this was my solution:
Sub End_Test()
Application.ScreenUpdating = False
Dim Foldername As String
Foldername = "M:\2017\Collections AR\Group Debts\Small Business\Statements\"
Sheets("Statement").Visible = True
Sheets("Invoice Template").Visible = True
Sheets("ACC.Outstanding").Visible = True
Sheets("Email List").Select
Range("C2").Select
For b = 2 To 250
Dim FSO As Object
Set FSO = CreateObject("Scripting.Filesystemobject")
Dim SourceFileName, DestinFileName As String
Do
On Error Resume Next
SourceFileName = "M:\2017\Collections AR\Group Debts\Small Business\Statements\" & Cells(b, 1) & "*"
DestinFileName = "M:\2017\Collections AR\Group Debts\Small Business\Statements\Sent\"
FSO.MoveFile Source:=SourceFileName, Destination:=DestinFileName
If Err.Number <> 0 Then
Err.Clear
GoTo Next1
End If
Loop While SourceFileName > 0
Next1:
Next
Sheets("Statement").Visible = False
Sheets("Invoice Template").Visible = False
Sheets("ACC.Outstanding").Visible = False
Application.ScreenUpdating = True
ActiveWorkbook.FollowHyperlink Foldername
MsgBox ("Emails Sent - Print the files remaining in the file"), , "Complete"
End Sub
Bookmarks