Hi Tempy,
Try this
ChDir "\\zapad01\sapinter"
ActiveWorkbook.SaveAs Filename:="\\zapad01\sapinter\GPS" & res & ".PRN",
_
FileFormat:=xlTextPrinter, CreateBackup:=False
ActiveWindow.Close
OldName = Activeworkbook.path & "\"& res & ".PRN"
NewName = Activeworkbook.path & "\"& res & ".DAT"
Name Oldname As Newname
--
HTH
Bob Phillips
"Tempy" wrote in message
...
Hello Bob,
I have tried using the code below but it does not work ?
Could you please heeeelp ?
The code runs, but does not change the ".PRN to ".DAT"
ChDir "\\zapad01\sapinter"
ActiveWorkbook.SaveAs Filename:="\\zapad01\sapinter\GPS" & res &
".PRN", _
FileFormat:=xlTextPrinter, CreateBackup:=False
ActiveWindow.Close
OldName = "\\zapad01\sapinter\GPS" & res & ".PRN": NewName = _
"\\zapad01\sapinter\GPS" & res & ".DAT"
Tempy
*** Sent via Developersdex http://www.developersdex.com ***