So here\'s the relevant snippet of my code (COPSFolder is a constant defined elsewhere):
Sub CreateReport(ByRef InfoArray() As String)
Dim BlankReport As Wo
The problem is that you are splitting using Chr(10)
This is not removing the spaces. And hence when you are calling ProjFolder = COPSFolder & "InProgress\" & InfoArray(3)
, you have spaces in InfoArray(3)
You have 3 options
When you are creating the array, remove the spaces there OR
When you are assigning InfoArray = GetPartInfo(File.Path)
, remove the spaces there OR
Change the line ProjFolder = COPSFolder & "InProgress\" & InfoArray(3)
to ProjFolder = COPSFolder & "InProgress\" & Trim(InfoArray(3))