Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro across a folder
OK, so here's the problem, I have a macro below which runs on a specific file
and re-saves it as long as I specify both filenames. I need to be able to run this action across multiple reports (up to 200 per month) and the file names will be inconsistent. Is there anyway I can run this macro across all sheets in a specified folder? Thanks guys Anne Sub Orchardcopypaste() ChDir "C:\ORCHARD" Workbooks.Open Filename:="C:\ORCHARD\CalendarView - February - Eureka[1].xls" Rows("1:3").Select Selection.Clear ActiveSheet.Shapes("Picture 75").Select Selection.Delete Range("A1").Select Sheets.Add Sheets("Report").Select ActiveSheet.Pictures.Insert("C:\ORCHARD\orchard header.jpg").Select Range("AW2").Select ActiveCell.FormulaR1C1 = "Monthly Management Report" Range("U4:BB11").Select Selection.Copy Range("AW2").Select With Selection.Font .Name = "Arial" .Size = 26 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With Selection.Font.Bold = True Selection.Cut Destination:=Range("AV2") Range("AV2").Select ActiveWorkbook.SaveAs Filename:="C:\ORCHARD\Orchard complete2.xls", _ FileFormat:=xlExcel9795, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False ActiveWorkbook.Close End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Report with macro losing links to a particular worksheet after running macro | Excel Programming | |||
disable user running macro from Tools Macro | Excel Discussion (Misc queries) | |||
Save file in a new folder, but create folder only if folder doesn't already exist? | Excel Programming | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
Launch Macro in Access via Macro running in Excel??? | Excel Programming |