Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run a macro on multiple files in folder
I have a folder that has about 100 diffrent excel files in it. I'd like to
run a macro which will add a footer with the current date on all of these. I can do this on one by hand but if I'd like to get them all in one fell swoop. Thanks in advance. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/comm...el.programming |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run a macro on multiple files in folder
Hi, you need to follow the given algorithm and write VBA code to fulfil your
task. 1. Initialise a FileSystem object 2. Get the number of files from the given directory 3. Within a loop (until the number of files is exhausted) do the following 3.1. Load the next file 3.2. Add footer with current date to the file "Alan" wrote: I have a folder that has about 100 diffrent excel files in it. I'd like to run a macro which will add a footer with the current date on all of these. I can do this on one by hand but if I'd like to get them all in one fell swoop. Thanks in advance. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/comm...el.programming |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run a macro on multiple files in folder
I've only written one macro as an experiment so my familiarity with the terms
is limited. More specefic instructions would be helpful. Thanks. "Madhan" wrote: Hi, you need to follow the given algorithm and write VBA code to fulfil your task. 1. Initialise a FileSystem object 2. Get the number of files from the given directory 3. Within a loop (until the number of files is exhausted) do the following 3.1. Load the next file 3.2. Add footer with current date to the file "Alan" wrote: I have a folder that has about 100 diffrent excel files in it. I'd like to run a macro which will add a footer with the current date on all of these. I can do this on one by hand but if I'd like to get them all in one fell swoop. Thanks in advance. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/comm...el.programming |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run a macro on multiple files in folder
Hi Alan,
I'm also learning at present and am trying to solve a similar problem. I'd suggest: 1 Record a macro to add the desired footer to your current workbook. 2 Search these forums for "run code on all files in folder" - there are a few likely looking entries where people have come up with the core code and left in comments saying "insert what you want to do here". 3 Insert the code generated by your first macro at the appropriate point in your second. Sorry this isn't more specific - I've still got lots to learn, but the answers are definately out there and recording a macro will allow you to customise this to your own needs. Hope this helps. Tom. "Alan" wrote: I've only written one macro as an experiment so my familiarity with the terms is limited. More specefic instructions would be helpful. Thanks. "Madhan" wrote: Hi, you need to follow the given algorithm and write VBA code to fulfil your task. 1. Initialise a FileSystem object 2. Get the number of files from the given directory 3. Within a loop (until the number of files is exhausted) do the following 3.1. Load the next file 3.2. Add footer with current date to the file "Alan" wrote: I have a folder that has about 100 diffrent excel files in it. I'd like to run a macro which will add a footer with the current date on all of these. I can do this on one by hand but if I'd like to get them all in one fell swoop. Thanks in advance. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/comm...el.programming |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add Cells Using Multiple Files in One Folder | Excel Discussion (Misc queries) | |||
Linking certain cells from Multiple files in a folder onto a summa | Excel Worksheet Functions | |||
Extract cell data from multiple files in one folder | Excel Discussion (Misc queries) | |||
opening multiple xls files in a folder | Excel Programming | |||
"Folder Select" Dialogue - Opening multiple files from selected folder | Excel Programming |