View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tempy Tempy is offline
external usenet poster
 
Posts: 203
Default Run a batch file from Excel

Hi Bob,
Thanks for the reply, i tried it and i get an error when it gets to
Name Oldname As Newname - the error is File not found Runtime error 53


ChDir "\\zapad01\sapinter"
ActiveWorkbook.SaveAs Filename:="\\zapad01\sapinter\GPS" & res &
".PRN", _
FileFormat:=xlTextPrinter

Oldname = ActiveWorkbook.Path & "\\zapad01\sapinter\GPS" & res &
".PRN"
Newname = ActiveWorkbook.Path & "\\zapad01\sapinter\GPS" & res &
".DAT"
Name Oldname As Newname



Tempy

*** Sent via Developersdex http://www.developersdex.com ***