ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pinda (https://www.excelbanter.com/excel-programming/316052-pinda.html)

Pinda[_2_]

Pinda
 
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.



Don Guillett[_4_]

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.






All times are GMT +1. The time now is 11:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com