VB Macro in Excel
Posted on 2003-03-14
Hello :-) I am trying to get a macro that will take a spreadsheet from excel that has 210 separate worksheets in it and separate and save them as separate files. Instead of recording these steps for each worksheet I am trying to get a loop to do it for me. I am getting errors on what I have so far. The sample listed below is only for the first 3 worksheets in the spreadsheet. Also after I have this task completed I need to e-mail all of these individual spreadsheets out through Microsoft Outlook. Does anyone know of a quick way to write a loop to do that???
' Separate2 Macro
' Macro recorded 3/5/2003 by Tatha
Dim Wrksheet As Worksheet
For Each Wrksheet In Sheets(Array("Accolade", "Aimco", "Alpha"))
'choose the name of the management co
Filename = ActiveCell.Value
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Tatha\Desktop\" & Filename
Thank you for your time...