Subscript Out of Range
Ok - I changed the variable names. See Below:
'Done$ has the path and file name of the "all done" file
Done$ = "W:\RPG_EXCEL\Done1.txt"
'Report$ has the path and name of the CSV file in the IFS.
Report$ = "W:\RPG_EXCEL\opnV1.CSV"
'ReportWB$ has the path and name of the XLS file in the IFS.
Reportwb$ = "W:\rpg_excel\opnords2.xls"
'ReportSN$ has the name of thw worksheet.
ReportSN$ = "OPNV1"
'ReportCSV$ has the name of the worksheet with .CSV
ReportCSV$ = "OPNOV1.CSV"
When I run at the statement
Workbooks.open filename = Report$ (the OPNV1.csv is open on my PC)
Then if I continue through the code
ActiveWorkbook.SaveAs Filename:=Reportwb$, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
(The OPNORDS2.XLS is open - and the OPNV1.CSV is not)
Then the next line of code is this and it returns the Runtime Error 9:
Worksheets(ReportSN$).Rows("1:1").Font.Bold = True