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
 
Single Command:


Name "C:\MyWkbk.xls" as "C:\YourWkbk.xls"


Chris Nebinger
 
Man, a two-for-one sale! Thanks for the help.

M

-----Original Message-----
Single Command:


Name "C:\MyWkbk.xls" as "C:\YourWkbk.xls"


Chris Nebinger


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top