0 votes
in VBA by Beginner (15 points)
hi all, I have a list of 40 files as patch (*.prz) and need to upgrade these for every new computer. The procedure for upgrading requires I copy a patch upgrade from source folderA (C:\) to folderB (E:\), then I run the update from my application. When the upgrade is finished, the folderB is empty and the next patch is pasted in and run. It must do one by one and I hope VBA can help me in this case. I'm thinking of using Microsoft Runtime Scripting and FSO but not sure. Thanks for all the help.

1 Answer

+1 vote
by Super Expert (2.4k points)
selected by
 
Best answer

It sounds like you'll need to use a combination of the VBA FSO CopyFile method to copy the files from folderA to folderB and a VBA Shell script to run your upgrade application. You'll also need to loop through the files in a folder with VBA.

Your macro will need to behave something like this:

  1. Loop through your list of .prz files. To do this, you'll need to know where your list of prz files is located.
  2. Use the FSO CopyFile method to copy them from folderA to folderB
  3. Use a VBA Shell script to launch whatever application you need to upgrade the prz files
Without more detail, I can't provide a specific answer, but these references should help you tackle your problem.
by Beginner (15 points)
+1

Dear Mr Wells,

 I'm very glad when get your answer, It is exactly what I want to do with my job. I'm still a newbie on VBA, all i've known is with VBA, i can do anything i want and creat anything what I think, after i visited your website. You're my idol heart, I've spend few days ago for read your post VBA tutorial on your website,and they help me very much for improved my knowledge. Thanks you very much.

by Super Expert (2.4k points)
I'm really glad you're enjoying the site and are finding it helpful! :-) You really can do so much with VBA.

Welcome to wellsr Q&A
wellsr Q&A is the VBA and Python programming community that rewards you for learning how to code.

Getting Started
Register
VBA Cheat Sheets (On Sale Now)

Earn free prizes for asking VBA and Python questions and for answering questions asked by others in our community.

What makes us different?
Our points system rewards you with a chance for free gifts based on the quality of your questions and answers. All you have to do is post and you could get rewarded, like these members:

runfunke $10 Amazon Gift Card
coolag $10 Amazon Gift Card
Siew Hun $10 Amazon Gift Card

So, why don't you join us? It really is an encouraging way to motivate members in our VBA and Python community.

Register

For more programming tips visit the VBA Tutorials Blog and the Python Tutorials Blog.

...