View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Beverly Beverly is offline
external usenet poster
 
Posts: 22
Default Looping through list of workbooks to open & sheets to move

I've just taken over the task of putting together a monthly reporting package
that combines about 80 separate workbooks into one. I want to automate this
incredibly boring task and was hoping that I could get some help here. From
what I've seen so far, you all are amazing!

Here's basically what I want my VBA code to do:

1. From my main workbook (which will be open), turn off automatic
calculation and then go to the Table of Contents sheet and delete the sheets
marked with an X in column F. There will be blank cells in this column as
well as X's. The end of the list is indicated by "End".
2. Go to cell G6 and open the file that I have listed there. Select the
active sheet, change the name to the value in cell E6, and then copy it into
my main workbook after the sheet listed in cell E5.
3. Close the file that I just copied the sheet from, and move on to the
next one listed in cell G7. If G7 is blank (and does not equal "End"), go to
cell G8 and open the file listed there. Stop when it reaches "End".

Any assistance would be greatly appreciated!

Beverly