rename a file name with vba access 2016

bill201
bill201 used Ask the Experts™
on
hi

how can i rename a file name with vba access 2016 ?

thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
Hi,

pls try

Name "c:\Dir\OldFileName.ext" As "c:\Dir\NewFileName.ext"

Open in new window

Regards
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and Programming
Top Expert 2015

Commented:
in VBA, use the NAME commend

Author

Commented:
i tried but i get this error message

run time error 75
path/file access error
Top Expert 2016

Commented:
What is your code?

Does the Destination Folder already exist if not
use mkDir

Author

Commented:
Now it's work thanks alot

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial