rename file

G

Guest

is it possible to rename a picture file using VBA? for example in file
C:/files/ i have picture.jpg, can i change that file name to
range("a1").value ?

thanks in advance
 
B

Bob Phillips

Use the Name statement

Dim OldName, NewName
OldName = "C:\files\i have picture.jpg
NewName = range("A1").Value
Name OldName As NewName

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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

Top