This is what I tried and got a error at strFile = Dir$

Sub savepotofolder()

Dim strFile As String, strpath As String
strpath = "D:\new sws folder\maintenance\poreq\"
strFile = Dir$(strpath & "*PO*.xls*")
Do While Len(strFile)
If strFile Like "*?PO*" Then Workbooks.Open strpath & strFile
strFile = Dir$

' saves poreqform with the file name taken from cell k69 in poreq folder
Sheets("poreqform").Select
Sheets("poreqform").Copy
thisfile = Range("k69").Value
strFolder$ = "D:\new sws folder\maintenance\poreq\" & Split(thisfile, "-")(3)
If Len(Dir$(strFolder$, vbDirectory)) = 0 Then MkDir strFolder$
ActiveWorkbook.SaveAs Filename:=strFolder$ & "\" & thisfile
ActiveWorkbook.Close

Loop





End Sub