Thread: Pinda
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Pinda

Please try to use a more meaningful subject line. I don't think anyone will
look for your name as a subject line in the archives. Many won't bother to
even look without a meaningful subject line.

Sub editname()
Dim OldName, NewName
OldName = "OLDFILE": NewName = "NEWFILE" ' Define file names.
Name OldName As NewName ' Rename file.

OldName = "C:\MYDIR\OLDFILE": NewName = "C:\YOURDIR\NEWFILE"
Name OldName As NewName ' Move and rename file.
End Sub

--
Don Guillett
SalesAid Software

"Pinda" wrote in message
...
Hello,

I am creating a system where spreadsheets get dropped into an Inbox folder
(e.g. c:\Inbox) folder and then moved or copied to an Outbox folder (e.g.
c:\Outbox), once they have been edited and saved.

I wish to attached some code to a button that prompts the user (with a
dialogue box), to save the spreadsheet, move or copy the folder to the
outbox, and then close the file down.

I understand that this is possible using the saveas function and then the
kill function (deleting the file in the inbox), but my VBA knowledge is

only
basic and I am finding it difficult to execute the code.

Could someone please help me with code, it will be very much appreciated.

Thanks in advance,

Pinda.