I am OK with VBA thats is used for file copying, renaming etc that I launch from Access and using the same in a Word macro. I assume Excel would be the same, although I don't know where I would put it
However, today I sold what I consider a nice back up system and the buyer also thought it was nice. But a friend of the buyer who was present asked could I make it in Excel or Word as they did not have MS Office Professional.
The problem is that the code is setting the value of fields on a form and using that data to form part of the file name (date/time). There is a whole lot of the following type of thing
Forms!CodeBUSystem!Current = ("Viper " + Format(Now, "YYYY-MM-DD") + " " & Format(Now, "hh-mm-ss"))
Forms!CodeBUSystem!Previous = Forms!CodeBUSystem!Current
FileCopy "C:\ViperResides\Viper.mdb", "\\MikeHP\ViperDaily\" & Format([Forms]![CodeBUSystem]![Current]) + ".mdb"
FileCopy "\\MikeHP\ViperDaily\" & Format([Forms]![CodeBUSystem]![Previous]) + ".mdb", "\\MikeHP\ViperArchive\" & Format([Forms]![CodeBUSystem]![Previous]) + ".mdb"
Kill "\\MikeHP\ViperDaily\" & Format([Forms]![CodeBUSystem]![Previous]) + ".mdb"
If this was launched from Excel would I use Cells to replace Form/Textbox references?
What about Word. Could something like this be done in Word.
Also, from Access I have it open a tabular form and as it completes each copy then it creates a new record and inserts the message etc. In fact the on screen presentation why the main reason I moved from doing this sort of thing in batch files. Could something like that be done using Excel, perhaps the "copies xyx to wheverer" could be inserted into Cells. What about Word, perhaps bookmarks.
However, today I sold what I consider a nice back up system and the buyer also thought it was nice. But a friend of the buyer who was present asked could I make it in Excel or Word as they did not have MS Office Professional.
The problem is that the code is setting the value of fields on a form and using that data to form part of the file name (date/time). There is a whole lot of the following type of thing
Forms!CodeBUSystem!Current = ("Viper " + Format(Now, "YYYY-MM-DD") + " " & Format(Now, "hh-mm-ss"))
Forms!CodeBUSystem!Previous = Forms!CodeBUSystem!Current
FileCopy "C:\ViperResides\Viper.mdb", "\\MikeHP\ViperDaily\" & Format([Forms]![CodeBUSystem]![Current]) + ".mdb"
FileCopy "\\MikeHP\ViperDaily\" & Format([Forms]![CodeBUSystem]![Previous]) + ".mdb", "\\MikeHP\ViperArchive\" & Format([Forms]![CodeBUSystem]![Previous]) + ".mdb"
Kill "\\MikeHP\ViperDaily\" & Format([Forms]![CodeBUSystem]![Previous]) + ".mdb"
If this was launched from Excel would I use Cells to replace Form/Textbox references?
What about Word. Could something like this be done in Word.
Also, from Access I have it open a tabular form and as it completes each copy then it creates a new record and inserts the message etc. In fact the on screen presentation why the main reason I moved from doing this sort of thing in batch files. Could something like that be done using Excel, perhaps the "copies xyx to wheverer" could be inserted into Cells. What about Word, perhaps bookmarks.