Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
problem with macros using Excel 2007
I have the following macro that was created under old excel and now that we
are on Excel 2007 it is no longer working. The workbook contains two sheets that are hidden. It seems that the macro is grabbing the last sheet and saving it as CSV instead of the one being activated. Sub CreateOutputFile() ' Macro created 8/29/2002 by Del Evans Application.StatusBar = "Creating Output Files, Please Wait . . ." Application.ScreenUpdating = False On Error GoTo 0 'Save the Treasury Spreadsheet ThisWorkbook.Worksheets("Treasury Work Area").Activate ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\All Users\Documents\Treasury ARE Worksheet.xls", FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False On Error GoTo 0 'Create the CSV file for the SAP BW Upload ThisWorkbook.Worksheets("Upload Data").Activate ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\All Users\Documents\AREEXCTR.csv", FileFormat:= _ xlCSV, CreateBackup:=False Application.StatusBar = "Output Files Created" Call MsgBox("Output Files Created", vbOKOnly, "Done!") Application.StatusBar = False End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Query Wizard problem with Access 2007 extensions | Excel Discussion (Misc queries) | |||
Excel 2007, I write macros in 2003 is 2007 similar for VBA? Pros andcons please | Excel Programming | |||
Excel 2007 macros - how to merge 5 macros together into one | Excel Discussion (Misc queries) | |||
Excel 2007 and macros | Excel Discussion (Misc queries) | |||
Excel 2007 problem with macros | Excel Programming |