Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Query Wizard problem with Access 2007 extensions Showdad Excel Discussion (Misc queries) 0 December 4th 08 05:57 PM
Excel 2007, I write macros in 2003 is 2007 similar for VBA? Pros andcons please Simon[_2_] Excel Programming 3 August 5th 08 03:48 PM
Excel 2007 macros - how to merge 5 macros together into one Sue Excel Discussion (Misc queries) 1 April 16th 08 08:36 PM
Excel 2007 and macros Chimelle Excel Discussion (Misc queries) 5 September 7th 07 10:03 PM
Excel 2007 problem with macros ugoveri Excel Programming 3 July 12th 06 02:40 AM


All times are GMT +1. The time now is 09:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"