Rename Excel Spreadsheet

  • Thread starter Thread starter M
  • Start date Start date
M

M

I have a spreadsheet that I am importing into Access 97. I
need to rename the file before opening it and am having
trouble figuring this one out. Can this be done from
Access and can it be done without opening the file?

Thanks

M
 
I'm not aware of a single command, although this function
will accomplish the same thing...

eg) FileRename "c:\MyWkbk.xls", "c:\YourWkbk.xls"

Sub FileRename(strFrom As String, strTo As String)
FileCopy strFrom, strTo
If Dir(strTo) <> "" Then
Kill strFrom
Else
MsgBox "Rename Failed"
End If
End Sub
 
Back
Top